# -*- coding: utf-8 -*-
import ahocorasick
import re
import json
from lxml import etree
import time
import table_model
import datetime
from ExtractAddress import partitionByName
from toShort import compNameToShort
from bs4 import BeautifulSoup
import html_text
import change_ac

class Ac_match():
    def __init__(self):
        self.reg1 = re.compile("<.*?>")
        self.cgr_keyword = ["采购人信息", "采购单位信息", "采购人", "招标人", "采购单位"]
        self.dl_keyword = ["采购代理机构信息", "采购代理机构", "招标组织机构", "代理机构"]
        #废标规则
        self.fb_rule = ['因#不足三家_50', '因#不足法定_50', '供应商不足三家', '本#废标_30', '废标原因', '中标结果无效', '投标供应商不足#流标_50', '因#不明确致采购失败_50', '供应商不足#废标_50', '报价人不足#失败_150', '投标人少于#流标_50', '本项目采购终止', '因#终止招标_50', '供应商不足#失败_50', '供应商不足法定数量', '不足法定#失败_50', '响应家数不足#失败_50', '采购工作终止', '投标单位不足#废标_50', '本项目予以废标处理', '采购活动取消', '参选人不足#失败_100', '终止本项目本次采购', '有效磋商供应商均不足#废标_50', '因无符合资格的竞价人而未能成功交易', '未抽取足够专家#采购失败_50', '只有#家供应商参加，则询价失败_10', '报名单位不足#询价失败_50', '投标的单位不足#废标_50', '没有投标单位报名#废标_50', '无有效投标人#失败_50', '供应商#谈判失败_50', '本项目废标', '本次评标作废标处理', '供应商不足#流标', '本项目谈判失败', '只有#家投标单位参与投标_30', '单位不足#失败_100', '本项目本次磋商失败', '报名家数不足#失败_30', '本项目询价失败', '无报价人递交报价文件#询价失败_30', '没有投标人报名#失败_50', '本项目招标失败', '终止本项目的招标工作', '投标单位不足#失败_50', '响应人不足#家#失败_50', '投标报名家数不足#失败_50', '中止采购活动', '终止#采购活动_30', '根据#原中标资格无效_50', '投标人不足#失败_50', '投标人不足#废标_50', '本项目作废标处理', '由于不满足#失败_50', '采购任务取消', '投标人家数不足#失败_50', '供应商少于#失败_50', '因#取消本次采购活动_50', '本项目比选失败', '无中标（成交）供应商', '本项目采购失败', '投标人少于#失败_30', '取消#采购项目_30', '无有效的参选人#失败_50', '本次招标项目流标', '本次公开询价失败', '取消相关招标工作', '本项目终止', '竞价失败', '此项目作以废标处理', "废标公告", "中止采购公告", "采购失败公示", "招标失败", "失败公告", "本#不足_50", "因#项目终止_50", "供应商数量不足#失败_50", "无中标供应商", "本项目予以废标", "供应商不足法定三家#废标_50", "投标人不足#家_10", "招标人不足#家_10", "报价人不足#家_10", "中标结果#无效_20", "废标#原因_30", "项目#招标失败_50", "项目#废标_30", "本#不足法定三家_30", "报名单位不足三家", "因#不足法定家数_30", "项目#废标_30", "因本项目#不足三家_50", "因作出#不足法定数量_50", "本#废标_50", "招标人不足三家#失败_50", "招标人不足三家#废标_50", "投标人不足三家#废标_50", "投标人不足三家#失败_50", "供应商不足三家#废标_50", "供应商不足三家#失败_50"]
        # 判定为页面没有信息的依据，还有一部分会从传入的规则添加进来
        self.unknow_dict = {'项目编号': ['采购项目编号：', '标段（包）编号：', '标段编号：', '项目编号:',
                                       '项目编号', '招标编号：', '招标编号:', '招标编号', '采购编号：',
                                       '采购编号:', '采购编号', '机构编号：', '采购计划编号：', '代理编号：',
                                       '委托编号：', '招标人编号：', '招标人编号:', '采购人编号：',
                                       '项目受理编号：', '招标文件编号：', '招标文件编号:', '采购文件编号',
                                       '招标项目编号：', '竞价编号：', '文件编号：', '工程编号：', '工程编号:',
                                       '工程编号', '项目统一代码：', '项目统一代码:', '公告编号'],
                            '项目名称': ['标段（包）名称：', '项目名称：', '项目名称:', '工程名称：', '工程名称:',
                                        '标的名称：', '标的名称:', '招标项目名称', '中标工程名称', '项目名称',
                                        '工程名称'],
                            '中标金额': ["中选价", "中 标 价：", "下浮率", "报价(万元)", "投标总价", "报价金额：", "报价金额", '总中标金额：', '总中标金额:', '总中标金额（元）：', '总中标金额（元）:',
                                       '中标金额：', '中标金额:', '中标金额（元）：', '中标金额（元）:',
                                       '中标金额（元）', '中标金额(元)', '中标金额（万元）', '中标金额(万元)',
                                       '中标总价：', '中标总价:', '中标总价（元）：', '中标总价（元）:',
                                       '中标总价（元）', '中标总价(元)', '中标总价（万元）', '中标总价(万元)',
                                       '中标价格：', '中标价格:', '中标价格（元）：', '中标价格（元）:',
                                       '中标价：', '中标价:', '中标价（元）：', '中标价（元）:', '中标价（元）',
                                       '中标价(元)', '中标价（万元）', '中标价(万元)', '总成交金额：',
                                       '总成交金额:', '总成交金额（元）：', '总成交金额（元）:',
                                       '中标、成交金额（元）', '中标、成交金额(元)', '中标、成交金额（万元）',
                                       '中标、成交金额(万元)', '成交金额：', '成交金额:', '成交金额（元）：',
                                       '成交金额（元）:', '成交金额（元）', '成交金额(元)', '成交金额（万元）',
                                       '成交金额(万元)', '成交总价：', '成交总价:', '成交总价（元）：',
                                       '成交总价（元）:', '成交价格：', '成交价格:', '成交价格（元）：',
                                       '成交价格（元）:', '成交价：', '成交价:', '成交价（元）：',
                                       '成交价（元）:', '中标（成交）金额：', '中标（成交）金额:',
                                       '中标（成交）金额（元）：', '中标（成交）金额（元）:', '最终报价为：',
                                       '最终报价为:', '最终报价为（元）：', '最终报价为（元）:',
                                       '项目总报价（含税）：', '项目总报价（含税）:', '项目总报价（含税）（元）：',
                                       '项目总报价（含税）（元）:', '项目承包结算价（元）', '中标、成交金额',
                                       '中标金额', '成交金额', '中标价 ', '成交价 ', '总价(元)',
                                       '最终报价（元）', '总价(元)', '中标价格（人民币元）', '中标价格(人民币元)'], 
                             '预算': ['最高限价：', '采购预算：', '采购预算:', '采购预算', '预算价：',
                                     '招标控制价:', '最高限价：', '预算金额（元）：', '最高限价（预算金额）：',
                                     '（预算金额）:', '预算金额：', '预算金额:', '预算限额：', '项目预算：',
                                     '（即最高限价）：', '项目规模（预算限额）：', '资金来源（预算限额）：',
                                     '最高限额：', '控制金额：', '采购金额：', '项目预算金额（含税）：',
                                     '项目预算:', '采购预算总额（含税）：', '预计标的额：', '框架预算:',
                                     '最高限价金额：', '控制价：', '最高投标限价如下：', '预估金额：',
                                     '项目总投资：', '预算约', '项目金额：', '最高投标限价：', '采购总预算：',
                                     '采购估算：', '招标预算:', '项目上限价：', '预算金额(元)：', '（最高限价）：',
                                     '（预算金额）：', '预算金（元）:', '采购预算（元）：', '预算金额为：',
                                     '本项目预算金额为', '预算金额为', '控制价为', '本项目预算金额', '投资预算',
                                     '本项目总预算约', '总价上限为', '最高限价为：', '项目预算为：', '预算上限值为：',
                                     '预算总额：', '最高投标限价为', '采购预算为：', '总预算为', '预算（最高限价）为',
                                     '预算总金额为', '投资总金额为', '最高限价为', '控制金额为', '最高预算',
                                     '采购项目预算金额', '项目预算金额', '招标项目预算金额', '采购项目总预算金额',
                                     '项目预算金额', '采购项目预算金额（元）', '最高限价', '采购预算金额（万元）',
                                     '预算金额', '控制金额'],
                             '招标人': ['招标机构：', '委托方名称：', '招标人名称:', '招标人名称：', '招标单位：',
                                       '招标单位:', '采购单位名称：', '采购单位名称:', '采购代理机构全称：',
                                       '采购单位名称：', '建设单位名称：', '招标机构：', '招 标 人：', '招 标 人:',
                                       '招标人：', '招标人:', '采购人：', '采购人:', '采购人名称：', '采购人名称:',
                                       '投标人名称：', '采购项目联系人（采购单位）:', '采购项目联系人（采购单位）：',
                                       '单位名称:', '单位名称：', '委托人:', '委托人：', '采购机构:', '采购机构：', 
                                       '建设单位:', '建设单位：', "采购单位：", "比选人："],
                             '中标供应商': ["供应商名称：", "投标供应商：", "中标供应商：", "成交候选人：", "成交候选供应商名称：", "投标供应商名称：", '中标供应商：', '中标人名称：', '成交人名称:', '成交人名称：', '中标人全称：',
                                          '中标供应商名称：', '成交供应商名称:', '成交供应商名称：', '第一中标候选人：',
                                          '第一中标候选人:', '第一中标候选人：', '第一中标候选供应商：', '第一中标候选供应商:',
                                          '第一中标候选供应商：', '中标单位：', '中标人：', '中标人:', '成交单位名称：',
                                          '中标候选人名称：', '中标（成交）供应商名称:', '中标（成交）供应商名称：', '成交单位:',
                                          '成交单位：', '第一成交候选人:', '第一成交候选人：', '中标、成交供应商名称:',
                                          '中标、成交供应商名称：', '中标供应商名称：'],
                             '采购方式': ['采购方式：', '招标方式：', '采购方式:', '竞争性磋商', '单一来源', '询价', '竞争性谈判',
                                      '招标方式：'],
                             "采购人地址": ["地址：", "地  址：", "招标人地址：", "采购单位地址：", "详细地址：", "采购人地址："],
                             "成交时间": ["中标日期", "中标时间", "发布时间：", "发布日期", "定标日期："],
                             "招标代理": ["采购项目联系人（代理机构）:", "采购代理机构 ：", '招标代理机构：', '采购代理机构名称：', '代理机构：', '询价代理机构：', '比选代理机构：', '招标代理：', '采购代理机构：', '招募代理机构：', '采购代理机构全称：', '招标代理单位：', '采购机构名称：', '政府采购代理机构：'],
                             "投标人": ["候选人：", "候选人为：", "投标供应商名称", "投标供应商", "投标人名称", "投标（报价）人名称", "参与抽签承包商"],
                             "购买标书截止日期": ["本公告期限", "招标文件售卖时间："],
                             "开标日期": ["开标时间："],
                             "需求时间": ["需求时间："],
                             "评委": ["成员：", "评审委员会"],
                             "发布时间": ["发布时间：", "发布招标公告时间（含本日）：", "发布招标公告时间：", "公告时间:",
                                          "公告日期：", "发布日期：", "公示开始时间：", "公告发布日期（含本日）：",
                                          "发稿时间：", "采购公示开始时间："]}
        pass

    # 判断是否为多包
    def bag_judge(self, name):
        if name in ['-1','-2']:
            return 'False'
        pattern = '(包|组|标|段|目)[0-9A-Za-z一二三四五六七八九]+[)）]*$|[（(]*[-]*[0-9A-Za-z一二三四五六七八九]+[期包]*[)）]*$'
        pattern_key = '[0-9A-Za-z一二三四五六七八九]'
        flag = re.search(pattern, name)
        if flag:
            match = flag.group(0)
            if len(match) <= 4:
                flag_key = re.search(pattern_key, match)
                if flag_key:
                    return 'True'
        return 'False'
    
    #获取两个词最邻近的位置
    def get_nearly_word(self, word1, word2, doc):
        word1_list=[i.start() for i in re.finditer(word1, doc)]
        word2_list=[i.start() for i in re.finditer(word2, doc)]
        near_ind = 0
        near_dis = 0
        for p1 in word1_list:
            for p2 in word2_list:
                p_dis = p2-p1
                if p_dis > 0 and near_dis == 0:
                    near_ind = p1
                    near_dis = p_dis
                elif p_dis > 0 and near_dis > p_dis:
                    near_dis = p_dis
                    near_ind = p1
        return near_ind
    
    # 供应商数据处理
    def get_company(self, res):
#        print ("公司", res)
        fh_str = "[\,|\，|\.|\。|\;|\；|\:|\：| ]"
        result = re.findall(fh_str + '*(.+公司)', res)
        if len(result) == 0:
            result = re.findall(fh_str + '(.+医院)', res)
        if len(result) == 0:
            result = re.findall(fh_str + '(.+局)', res)
        if len(result) == 0:
            result = re.findall(fh_str + '(.+小学)', res)
        if len(result) == 0:
            result = re.findall(fh_str + '(.+中学)', res)
        if len(result) == 0:
            result = re.findall(fh_str + '(.+大学)', res)
        if len(result) == 0:
            result = re.findall(fh_str + '(.+学校)', res)
        if len(result) == 0:
            result = re.findall(fh_str + '(.+办公室)', res)
        if len(result) == 0:
            result = re.findall(fh_str + '(.+街道办)', res)
        if len(result) == 0:
            result = re.findall(fh_str + '(.+政府)', res)
        if len(result) == 0:
            result = re.findall(fh_str + '(.+中心)', res)
        if len(result) == 0:
            result = re.findall(fh_str + '(.+队)', res)
        if len(result) == 0:
            result = re.findall(fh_str + '(.+馆)', res)
        if len(result) == 0:
            result = re.findall(fh_str + '(.+院)', res)
        if len(result) == 0:
            result = re.findall(fh_str + '(.+处)', res)
        if len(result) > 0:
            ret_res = result[0]
        else:
            ret_res = res
        return ret_res

    # 处理html源码
    """
    获取源码内容
    再用正则去除没删干净的<>
    特殊关键词前加空格
    特殊字符替换
    """
    def del_html(self,input_doc, input_dict = {}, notice_status=""):
        //所有的加一个空格，为了切分
        rep_list = ['采购项目联系人（采购单位）:', "候选中标供应商：", "批准书文号：", "第二成交候选人", "地 址：", "招标代理服务费：", "地     址：", "评标日期：", "详见：", "详见:", "工期:", "联系地址:", "合同附件：", "投标登记时间：", "工 程 名 称：", "工 程 编 号：", "地  址：", "采购项目简要说明", "商务得分:", "技术得分：", "报价得分：" "联　系　人：", "2.项目编号", "项目编号", "中标供应商开户行  ：", "规格型号：", "合同编号：", "合同金额(元)：", "合同签订日期：", "采购人（全称）：", "询价小组按照询价文件的要求", "评标委员会依据招标文件", "磋商小组依据磋商文件", '经评审小组评审', "谈判小组依据", "项目分包（标段）：", "评委姓名：", "采购项目用途", "采购代理机构内部", "采购代理机构内部编号：", "项目联系人：", "联系人：", "项目序列号:", "项目序列号：", "预算编号：",  "负责人：", "成员：", "成交供应商名称及成交金额：", "成交供应商地址：", "项目总金额：", "入围单位名称和地址、成交金额：", "采购项目名称", "项目负责人：", "中标单位名称及中标金额：", '采购项目联系人（采购单位）：', '项目总报价（含税）（元）：', '项目总报价（含税）（元）:', '中标（成交）金额（元）：', '中标（成交）金额（元）:', '中标（成交）供应商名称:', '中标（成交）供应商名称：', "中标单价合计金额：", '中标、成交金额（万元）', '中标、成交金额(万元)', '最高限价（预算金额）：', '项目规模（预算限额）：', '资金来源（预算限额）：', '项目预算金额（含税）：', '采购预算总额（含税）：', '采购项目预算金额（元）', '中标、成交供应商名称:', '中标、成交供应商名称：', '中标、成交金额（元）', '统一社会信用代码：', '中标、成交金额(元)', "采购需求：",  '项目总报价（含税）：', '项目总报价（含税）:', '项目承包结算价（元）', '中标价格（人民币元）', '中标价格(人民币元)', '采购预算金额（万元）', '第一中标候选供应商:', "中标供应商地址：", '第一中标候选供应商：', '采购代理机构名称：', '中标单价合计金额：', '采购代理机构地址：', '总中标金额（元）：', '总中标金额（元）:', "招标范围：", "中标服务工时：", '总成交金额（元）：', '总成交金额（元）:', '中标（成交）金额：', '中标（成交）金额:', '最终报价为（元）：', '最终报价为（元）:', '最高投标限价如下：', '预算（最高限价）为', '采购项目总预算金额', '第一中标候选供应商', '第一中标候选人名称', '标段（包）编号：', '标段（包）名称：', '中标金额（元）：', '中标金额（元）:', '中标金额（万元）', '中标金额(万元)', '中标总价（元）：', '中标总价（元）:', '中标总价（万元）', '中标总价(万元)', '中标价格（元）：', '中标价格（元）:', '成交金额（元）：', '成交金额（元）:', '成交金额（万元）', '成交金额(万元)', '成交总价（元）：', '成交总价（元）:', '成交价格（元）：', '成交价格（元）:', '预算金额（元）：', '（即最高限价）：', '预算金额(元)：', '采购预算（元）：', '本项目预算金额为', '采购项目预算金额', '招标项目预算金额', '采购代理机构全称', '成交供应商名称:', '成交供应商名称：', '第一中标候选人:', '第一中标候选人：', '第一成交候选人:', '第一成交候选人：', '中标供应商名称：', "采购人单位联系人：", '招标代理机构：', '报价明细附件：', '采购项目编号：', '采购计划编号：', '项目受理编号：', '招标文件编号：', '招标文件编号:', '招标项目编号：', '项目统一代码：', '项目统一代码:', '中标金额（元）', '中标金额(元)', '中标总价（元）', '中标总价(元)', '中标价（元）：', '中标价（元）:', '中标价（万元）', '中标价(万元)', '成交金额（元）', '成交金额(元)', '成交价（元）：', '成交价（元）:', '中标、成交金额', '最终报价（元）', '（预算金额）:', '最高限价金额：', '最高投标限价：', '（最高限价）：', '（预算金额）：', '预算金（元）:', '本项目预算金额', '本项目总预算约', '预算上限值为：', '最高投标限价为', '采购单位名称：', '采购单位名称:', '中标供应商名称', '第一中标候选人', '成交候选人：', '联系人电话：', '中标候选人：', '招标人编号：', '招标人编号:', '采购人编号：', "项目编号：", "采购人地址：", '采购文件编号', '招标项目名称', '中标工程名称', "唱价时间：", "投标报价：", '总中标金额：', '总中标金额:', '中标价（元）', '中标价(元)', "联系地址：", '总成交金额：', '总成交金额:', '最终报价为：', '最终报价为:', '招标控制价:', '预计标的额：', '项目总投资：', '采购总预算：', '项目上限价：', '预算金额为：', '最高限价为：', '项目预算为：', '采购预算为：', '预算总金额为', '投资总金额为', '项目预算金额', '项目预算金额', '委托方名称：', '招标人名称:', '招标人名称：', '采购单位名称', '建设单位名称', "成交下浮率：", '招 标 人：', '招 标 人:', '采购人名称：', '采购人名称:', '中标供应商：', '成交人名称:', '成交人名称：', '成交单位名称', '公示时间：', '联系电话：', '法人代表:', '开标时间：', '中标人信息', '联系方式：', '评审时间：', '法人代表：', '评审日期：', '标段编号：', '项目编号:', '招标编号：', '招标编号:', '采购编号：', '采购编号:', '机构编号：', '代理编号：', '委托编号：', '竞价编号：', '文件编号：', '工程编号：', '工程编号:', '项目名称：', '项目名称:', '工程名称：', '工程名称:', '标的名称：', '标的名称:', '中标金额：', '中标金额:', '中标总价：', '中标总价:', '中标价格：', '中标价格:', '成交金额：', '成交金额:', '成交总价：', '成交总价:', '成交价格：', '成交价格:', '总价(元)', '总价(元)', '最高限价：', '采购预算：', '采购预算:', '最高限价：', '预算金额：', '预算金额:', '预算限额：', '项目预算：', "中标费率：", '最高限额：', '控制金额：', '采购金额：', '项目预算:', '框架预算:', '预估金额：', '项目金额：', '采购估算：', '招标预算:', '预算金额为', '总价上限为', '预算总额：', '最高限价为', '控制金额为', '招标机构：', '招标单位：', '招标单位:', '投标人名称', '采购机构:', '采购机构：', '建设单位:', '建设单位：', '中标人名称', '中标人全称', '成交单位:', '成交单位：', '采购方式：', '招标方式：', "法定代表人：",  '采购方式:', '竞争性磋商', '竞争性谈判', '招标方式：', '制造商：', '联系人：', "交货期：", '采购编号', '工程编号', '公告编号', '项目名称', '工程名称', '中标价：', '中标价:', '成交价：', '成交价:', '中标金额', '成交金额', '中标价 ', '成交价 ', '采购预算', '预算价：', '控制价：', '控制价为', '投资预算', '总预算为', '最高预算', '最高限价', '预算金额', '控制金额', '招标机构', '招标人：', '招标人:', '采购人：', '采购人:', '委托人:', '委托人：', '中标单位', '中标人：', '中标人:', '单一来源', '（1）', '（2）', '（3）', '（4）', '（5）', '（6）', '预算约', '招标人', '地址：', '一、', '二、', '三、', '四、', '五、', '六、', '七、', '八、', '九、', '十、', '1、', '2、', '3、', '4、', '5、', '6、', '7、', '8、', '9、', '1．', '2．', '3．', '4．', '5．', '6．', '7．', '8．', '9．','（一）','（二）','（三）', '（四）', '（五）', '（六）', '（七）', '（八）', '（九）']               
        for key, rule_list in input_dict.items():
            for word in rule_list:
                if '#' not in word and word not in rep_list:
                    if ":" in word or "：" in word:
                        rep_list.append(word)
                        if word not in self.unknow_dict[key]:
                            self.unknow_dict[key].append(word)
        rep_list = sorted(rep_list, key = lambda i:len(i),reverse=True)
        input_doc = input_doc.replace(" </span>", "</span>")
        input_doc = input_doc.replace(" <span", "<span")
        if "中国电信-阳光采购网外部门户" in input_doc:
            content = str(self.reg1.sub('', input_doc))
        else:
            res = etree.HTML(input_doc)
            content = str(res.xpath('string(.)'))
    #        content = input_doc
    #        print (content)
            content = str(self.reg1.sub('', content))
        rep_doc = ""
        """
        预招标才需要
        """
        if notice_status == "预招标公告" and "广东省政府采购网" in input_doc:
            n_res = re.findall('<table.*?/table>', input_doc, re.S)
            for i in range(len(n_res)):
                new_res = etree.HTML(n_res[i])
                data1 = new_res.xpath('//table/tbody/tr/td/text()')
                data1 = [x for x in data1 if x!=" " and x!='\n' and "附件" not in x]
                remove_list = []
                for x in data1:
                    x_res = re.findall(x + '.*?</td', n_res[i], re.S)[0]
                    if "<input" not in x_res:
                        remove_list.append(x)
                for r in remove_list:
                    data1.remove(r)
                data1 = [x.replace(' ', '') for x in data1]
                data1 = [x.replace('\n', '') for x in data1]
                data1 = [x.replace('\t', '') for x in data1]
                while '' in data1:
                    data1.remove('')
                data1 = [x for x in data1 if x!=" " and x!='\n' and "附件" not in x]
                data2 = new_res.xpath('//table/tbody/tr/td/input/@value')
                if "发布时间：" in data1 and data1[-1] == "日" and data1[-2] == "月" and data1[-3]=="年":
                    new_data1 = data2[-3] + data1[-3] + data2[-2] + data1[-2] + data2[-1] + data1[-1]
                    for x in data1[-3:]:
                        data1.remove(x)
                    for x in data2[-3:]:
                        data2.remove(x)
                    data2.append(new_data1)
                for x in data1:
                    content = content.replace(x, '')
                for i in range(len(data1)):
                    if i >= len(data2):
                        data2[i] = ' '
                    content = content + data1[i] + data2[i] +'\n'

        content = content.replace(' 万元', '万元')
        content = content.replace('\n', ' ')
        content = content.replace('\xa0',' ')
        content = content.replace('\\r', ' ')
        content = content.replace('\\n', ' ')
        content = content.replace('\\t', ' ')
        content = content.replace('\r',' ')
        content = content.replace('\t', ' ')
        content = content.replace('&gt;', '')
        content = content.replace('&lt;/p', '')
        content = content.replace('&lt;p', '')
        content = content.replace('&lt;span', '')
        content = content.replace('&lt;/span', '')
        content = content.replace('&nbsp;', '')
        content = content.replace('  万元', '万元')
        content = content.replace(' 万元', '万元')
        content = content.replace('人民币 ', '人民币')
        content = content.replace('名 称', '名称')
        content = content.replace(' 年', '年')
        content = content.replace('年 ', '年')
        content = content.replace(' 月', '月')
        content = content.replace('月 ', '月')
        content = content.replace('  日', '日')
        content = content.replace('日  ', '日')
        content = content.replace(' 日', '日')
        content = content.replace('日 ', '日')
        content = content.replace('时 ', '时')
        content = content.replace(' 时', '时')
        content = content.replace('- ', '-')
        content = content.replace('。', ' 。 ')
        
        if "采招网" in content or "中 国采招" in content or "中国采 招" in content or "中国采招" in content or "中国 采招" in content:
            content = content.replace('      联系方式', '')
            content = content.replace(' 联系方式 ', '')
            content = content.replace(' 联系方式', '')
            content = content.replace('      查看企业资料', '')
            content = content.replace(' 查看企业资料 ', '')
            content = content.replace(' 查看企业资料', '')
            content = content.replace('#中国 采招网', ' #中国 采招网')
            content = content.replace('中国采招 网', ' 中国采招 网 ')
            content = content.replace('中 国采招', ' 中 国采招')
            content = content.replace('中国采 招', ' 中国采 招')
            content = content.replace('中国采招网', ' 中国采招网 ')
            content = content.replace('中国采 招网', '  中国采 招网 ')
            content = content.replace('（ bidcenter.com.cn）', '')
            content = content.replace('招标人         ', "招标人：")
            content = content.replace('建设单位        ', '建设单位：')
            content = content.replace('发包人名称             ', "发包人名称：")
            content = content.replace('发包人                ', "发包人：")
            content = content.replace('供应商        ', "供应商：")
            content = content.replace('成 交 价   ', '成 交 价：')
            content = content.replace('中 标 价   ', '中 标 价：')
            content = content.replace(' 成 交 结 果 公 告 ', "成交结果公告")
            content = content.replace('中标（成交）供应商（乙方）:           ', '中标（成交）供应商（乙方）:')
        for word in rep_list:
            if word in content and word not in rep_doc:
                x = '  ' + word
                content = content.replace(word, x)
                rep_doc += word + " "
        return content

    """
    从标题获取项目名
    """
    def get_obj_name_from_title(self, title):
#        num_str = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9','a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',]
        if title[0] == "(" and title[-1] != ")":
            reg = re.compile("\(.*?\)")
            title = str(reg.sub('', title))
        elif title[0] == "（" and title[-1] != "）":
            reg = re.compile("（.*?）")
            title = str(reg.sub('', title))
        elif title[0] == "[" and title[-1] != "]":
            reg = re.compile("\[.*?\]")
            title = str(reg.sub('', title))
        elif title[0] == "【" and title[-1] != "】":
            reg = re.compile("【.*?】")
            title = str(reg.sub('', title))
            
        if "关于" in title and "的合同" in title:
            res = re.findall('关于(.+?)的合同', title)
        elif "关于" in title and "项目" in title:
            res = re.findall("关于(.+?项目)", title)
        elif "项目" in title:
            res = re.findall('.+?项目', title)
        elif "采购" in title:
            res = re.findall('.+?采购', title)
        elif "工程" in title:
            res = re.findall('.+?工程', title)
        elif "服务" in title:
            res = re.findall('.+?服务', title)
        elif "承包" in title:
            res = re.findall(".+?承包", title)
        else:
            res = []
        if len(res) > 0:
            result = res[0]
            if len(result) < 4:
                result = title
        else:
            result = title
        return result

    # 下载附件
    def get_download_url(self, html_code):
        soup = BeautifulSoup(html_code, 'lxml')
        doc_reg = re.compile('.*\.doc')
        pdf_reg = re.compile('.*\.pdf')
        pdf_reg2 = re.compile('.*\.PDF')
        xlsx_reg = re.compile('.*\.xlsx')
        gzz_reg = re.compile('.*\.GZZF')
        rar_reg = re.compile('.*\.rar')
        doc_node = soup.findAll('a', href=doc_reg)
        doc_node2 = soup.findAll('a', text=doc_reg)
        pdf_node = soup.findAll('a', href=pdf_reg)
        pdf_node2 = soup.findAll('a', text=pdf_reg)
        pdf_node3 = soup.findAll('a', text=pdf_reg2)
        pdf_node4 = soup.findAll('a', href=pdf_reg2)
        xlsx_node = soup.findAll('a', href=xlsx_reg)
        gzzf_node = soup.findAll('a', href=gzz_reg)
        rar_node = soup.findAll('a', href=rar_reg)
        res_list = []
        
        for x in doc_node:
            if x['href'] == 'javascript:void(0)':
                reg = re.compile('.*\.doc')
                data_node = soup.findAll('a', onclick=reg)
                for y in data_node:
                    result = re.findall('fileName=(.*?\.doc)', y["onclick"])
                    if len(result) > 0:
                        res_list.append(result[0])
                break
            else:
                res_list.append(x['href'])
        for x in doc_node2:
            if x['href'] == 'javascript:void(0)':
                reg = re.compile('.*\.doc')
                data_node = soup.findAll('a', onclick=reg)
                for y in data_node:
                    result = re.findall('fileName=(.*?\.doc)', y["onclick"])
                    if len(result) > 0:
                        res_list.append(result[0])
                break
            else:
                res_list.append(x['href'])
        for x in pdf_node:
            if x['href'] == 'javascript:void(0)':
                reg = re.compile('.*\.pdf')
                data_node = soup.findAll('a', onclick=reg)
                for y in data_node:
                    result = re.findall('fileName=(.*?\.pdf)', y["onclick"])
                    if len(result) > 0:
                        res_list.append(result[0])
                break
            else:
                res_list.append(x['href'])
        for x in pdf_node2:
            if x['href'] == 'javascript:void(0)':
                reg = re.compile('.*\.pdf')
                data_node = soup.findAll('a', onclick=reg)
                for y in data_node:
                    result = re.findall('fileName=(.*?\.pdf)', y["onclick"])
                    if len(result) > 0:
                        res_list.append(result[0])
                break
            else:
                res_list.append(x['href'])
        for x in pdf_node3:
            if x['href'] == 'javascript:void(0)':
                reg = re.compile('.*\.PDF')
                data_node = soup.findAll('a', onclick=reg)
                for y in data_node:
                    result = re.findall('fileName=(.*?\.PDF)', y["onclick"])
                    if len(result) > 0:
                        res_list.append(result[0])
                break
            else:
                res_list.append(x['href'])
        for x in pdf_node4:
            if x['href'] == 'javascript:void(0)':
                reg = re.compile('.*\.PDF')
                data_node = soup.findAll('a', onclick=reg)
                for y in data_node:
                    result = re.findall('fileName=(.*?\.PDF)', y["onclick"])
                    if len(result) > 0:
                        res_list.append(result[0])
                break
            else:
                res_list.append(x['href'])
        for x in xlsx_node:
            if x['href'] == 'javascript:void(0)':
                reg = re.compile('.*\.xlsx')
                data_node = soup.findAll('a', onclick=reg)
                for y in data_node:
                    result = re.findall('fileName=(.*?\.xlsx)', y["onclick"])
                    if len(result) > 0:
                        res_list.append(result[0])
                break
            else:
                res_list.append(x['href'])
        for x in gzzf_node:
            if x['href'] == 'javascript:void(0)':
                reg = re.compile('.*\.GZZF')
                data_node = soup.findAll('a', onclick=reg)
                for y in data_node:
                    result = re.findall('fileName=(.*?\.GZZF)', y["onclick"])
                    if len(result) > 0:
                        res_list.append(result[0])
                break
            else:
                res_list.append(x['href'])
        for x in rar_node:
            if x['href'] == 'javascript:void(0)':
                reg = re.compile('.*\.rar')
                data_node = soup.findAll('a', onclick=reg)
                for y in data_node:
                    result = re.findall('fileName=(.*?\.rar)', y["onclick"])
                    if len(result) > 0:
                        res_list.append(result[0])
                break
            else:
                res_list.append(x['href'])
        res_list = list(set(res_list))
        if "中国政府采购网" in html_code:
            res_list = ["http://www.gdgpo.gov.cn" + x if "http:" not in x else x for x in res_list]
        return res_list

    # 中文金额转成数字
    def chinese_to_arabic(self, cn):
        star = time.time()
        try:
            print ('中文金额:', cn)
            CN_NUM = {
                    '〇' : 0, '一' : 1, '二' : 2, '三' : 3, '四' : 4, '五' : 5, '六' : 6, '七' : 7, '八' : 8, '九' : 9, '零' : 0,
                    '壹' : 1, '贰' : 2, '叁' : 3, '肆' : 4, '伍' : 5, '陆' : 6, '柒' : 7, '捌' : 8, '玖' : 9, '貮' : 2, '两' : 2,
                    }
    
            CN_UNIT = {'十' : 10, '拾' : 10, '百' : 100, '佰' : 100, '千' : 1000, '仟' : 1000, '万' : 10000, '萬' : 10000, '亿' : 100000000, '億' : 100000000, '兆' : 1000000000000,}
            unit = 0
            ldig = []
            for cndig in reversed(cn):
                if cndig in CN_UNIT:
                    unit = CN_UNIT.get(cndig)
                    if unit == 10000 or unit == 100000000:
                        ldig.append(unit)
                        unit = 1
                else:
                    dig = CN_NUM.get(cndig)
                    if unit:
                        dig *= unit
                        unit = 0
                    ldig.append(dig)
            if unit == 10:
                ldig.append(10)
            val, tmp = 0, 0
            for x in reversed(ldig):
                if x == 10000 or x == 100000000:
                    val += tmp * x
                    tmp = 0
                else:
                    tmp += x
            val += tmp
        except:
            val = ""
        print ("金额转数字耗时：", time.time()-star)
        return val

    # 中文日期转数字
    """
    按年月日切分，再分别把对应的数字进行转换
    """
    def chinese2date(self, date_str):
        star = time.time()
        try:
            CN_NUM = {
                    '〇' : 0, '○': 0, '一' : 1, '二' : 2, '三' : 3, '四' : 4, '五' : 5, '六' : 6, '七' : 7, '八' : 8, '九' : 9, '零' : 0,
                    '壹' : 1, '贰' : 2, '叁' : 3, '肆' : 4, '伍' : 5, '陆' : 6, '柒' : 7, '捌' : 8, '玖' : 9, '貮' : 2, '两' : 2,
                }
            CN_UNIT = {"十": 10, "拾": 10, "〇": 0, "零": 0, '○': 0}
            date_str = date_str.replace('年', '-')
            date_str = date_str.replace('月', '-')
            date_str = date_str.replace('日', '')
            date_list = date_str.split('-')
            year_date = date_list[0]
            month_date = date_list[1]
            day_date = date_list[2]
            num_year = year_date
            for x in year_date:
                num_year = num_year.replace(x, str(CN_NUM[x]))
            if len(month_date) == 1:
                if month_date in CN_NUM:
                    num_month = str(CN_NUM[month_date])
                else:
                    num_month = str(CN_UNIT[month_date])
            else:
                num_month = str(CN_UNIT[month_date[0]] + CN_NUM[month_date[1]])
            if len(day_date) == 1:
                if day_date in CN_NUM:
                    num_day = str(CN_NUM[day_date])
                else:
                    num_day = str(CN_UNIT[day_date])
            elif len(day_date) == 2:
                if day_date[-1] in CN_UNIT:
                    num_day = str(CN_NUM[day_date[0]]*CN_UNIT[day_date[1]])
                else:
                    num_day = str(CN_UNIT[day_date[0]] + CN_NUM[day_date[1]])
            else:
                num_day = str(CN_NUM[day_date[0]]*CN_UNIT[day_date[1]] + CN_NUM[day_date[2]])
            num_date = num_year + '-' + num_month + '-' + num_day
        except:
            num_date = ""
        print ("日期中文转换：", time.time()-star)
        return num_date

    # 文本ac结果
    def get_ac_result(self, AC, doc):
        result_dict = {}
        for item in AC.iter(doc):
            if item[1][1] in result_dict:
                result_dict[item[1][1]].append(item[0])
            else:
                result_dict[item[1][1]] = [item[0]]
        return result_dict

    # 金额数据处理函数
    """
    区分是具体金额还是折扣率下浮率
    再判定是否是数字，若是中文进行格式转换
    正则匹配数字
    """
    def Money_data(self, word, rule_base):
        print (word)
        if "要求" in word or "采用" in word or "代理费" in word or "得分" in word or "包" in word or "平板" in word or "智能" in word or "折扣费" in word or "服务费" in word or "差额定率" in word or "年度" in word or "审批" in word or word == "1" or "文件" in word or "采购" in word or "委托" in word or "部分" in word or len(word) < 2 or "互联网" in word or "G" in word or "计算" in word or "号" in word or word=="1.":
            if "元" not in word:
                word = ''
        for fh in [' ', ',', '￥', '，', '。', '；', ';']:
            word = word.replace(fh, '')
        if ":" in word or "：" in word:
            reg = re.compile(".+?[:|：]")
            word = reg.sub('', word)
        if "元" in word and "万元" not in word:
            if len(re.findall('[0-9]元', word)) > 0:
                del_reg = re.compile("元(.+?$)")
                word = del_reg.sub('', word)
#        elif "万元" in word:
#            if len(re.findall('[0-9]万元', word)) > 0:
#                del_reg = re.compile("万元(.+?$)")
#                word = del_reg.sub('', word)
        star = time.time()
        print ("金额处理", word)
        if '%' in word and "元" not in word:
            if '.' in word:
                result_word_list = re.findall('[0-9][0-9]*\.+[0-9]*%', word)
                result_word = result_word_list[0] if len(result_word_list) > 0 else ""
            else:
                result_word_list = re.findall('[0-9][0-9]*%', word)
                result_word = result_word_list[0] if len(result_word_list) > 0 else ""
        else:
            stat = "False"
            chinese_num = '零,一,壹,二,两,贰,三,叁,四,肆,伍,五,六,陆,柒,七,捌,八,玖,九,十,拾,百,佰,千,仟,万,萬,亿'
            chinese_list = ['零', '一', '壹', '二', '两', '贰', '三', '叁', '四', '肆', '伍', '五', '六', '陆', '柒', '七', '捌', '八', '玖', '九', '十', '拾', '百', '佰', '千', '仟', '万', '萬', '亿']
            ch_num = 0
            for cn in chinese_list:
                if cn in word:
                    ch_num += 1
            if ch_num > 2:
                try:
                    ch_res = re.findall('([' + chinese_num + '].*?元)', word)
                    if len(ch_res) > 0:
                        word = ch_res[0]
                except:
                    1
            if "元" in word:
                stat = "True"
            elif '计算方式' in word or '计算基数' in word or '进行计算' in word or '国家' in word or '包组' in word or '运营' in word:
                result_word = ''
            else:
                stat = "True"
            if stat == "True":
                if len(word) == 0:
                    result_word = ''
                else:
                    if word[-1] == '.':
                        word = word.replace('.', ' ')
                    if word[-1] == "万":
                        word = word + '元'
                    if "." in word:
                        result_word_list =re.findall('[0-9][0-9]*\.+[0-9]*', word)
                        if len(result_word_list) != 0:
                            if "万元" in word:
                                if word.rfind('万元') > word.find(result_word_list[0]) and word.rfind('万元')-word.find(result_word_list[0]) < 30 and word.find("元") > word.find("万元"):
                                    len_bas = re.findall('[0-9][0-9]*', result_word_list[0])[0]
                                    if len(len_bas) < 6:
                                        result_word = result_word_list[0] + '万元'
                                    else:
                                        result_word = result_word_list[0] + "元"
                                else:
                                    result_word = result_word_list[0]
                            elif "万元" in rule_base and "万元" not in word and len(result_word_list) != 0:
                                len_bas = re.findall('[0-9][0-9]*', result_word_list[0])[0]
                                if len(len_bas) < 6:
                                    result_word = result_word_list[0] + '万元'
                                else:
                                    result_word = result_word_list[0] + "元"
                            else:
                                result_word = result_word_list[0] + "元"
                        else:
                            result_word_list = re.findall('([' + chinese_num + '].+)元', word)
                            if len(result_word_list) != 0:
                                result_word_list = [self.chinese_to_arabic(x) for x in result_word_list]
                                if result_word_list[0] != "":
                                    result_word = str(result_word_list[0]) + '元'
                                else:
                                    result_word = result_word_list[0]
                            else:
                                result_word = ''
                    else:
                        result_word_list = re.findall('[0-9][0-9]*', word)
                        if len(result_word_list) != 0:
                            if "万元" in word:
                                if len(result_word_list[0]) < 6:
                                    result_word = result_word_list[0] + '万元' if word.rfind('万元') > word.find(result_word_list[0]) and word.find("元") > word.find("万元") else result_word_list[0]
                                else:
                                    result_word = result_word_list[0] + "元"
                            else:
                                result_word = result_word_list[0] + "元"
                        elif "万元" in rule_base and "万元" not in word and len(result_word_list) != 0:
                            if len(result_word_list[0]) < 6:
                                result_word = result_word_list[0] + '万元'
                            else:
                                result_word = result_word_list[0] + "元"
                        else:
                            result_word_list = re.findall('([' + chinese_num + '].+)元', word)
                            if len(result_word_list) != 0:
                                result_word_list = [self.chinese_to_arabic(x) for x in result_word_list]
                                result_word = str(result_word_list[0]) + '元'
                            else:
                                result_word = ''
        if result_word != '':
            num_res = re.findall('[0-9]', result_word)
            if len(num_res) == 0:
                result_word = ""
            if '.' not in result_word and len(result_word) > 10:
                result_word = ""

        print ("金额处理用时：", time.time()-star, result_word)
        if '%' in result_word:
            res_num = float(result_word.replace('%', ''))/100
            if res_num >= 1:
                result_word = ''
        if '元' in result_word:
            if '万元' in result_word:
                if '.' in result_word:
                    result_word_re = re.findall('[0-9][0-9]*\.[0-9]*', result_word)[0]
                    result_word = str(round(float(result_word_re)*10000, 2)) + '元' if result_word.find('万元') > result_word.find(result_word_re) and result_word.find('元') > result_word.find('万元') else result_word_re
                else:
                    result_word_re = re.findall('[0-9][0-9]*', result_word)[0]
                    result_word = str(round(float(result_word_re)*10000, 2)) + '元' if result_word.find('万元') > result_word.find(result_word_re) and result_word.find('元') > result_word.find('万元') else result_word_re
            else:
                result_word = re.findall('[0-9][0-9]*\.+[0-9]*', result_word)[0] + '元' if '.' in result_word else re.findall('[0-9][0-9]*', result_word)[0] + '元'
        return result_word
    
    # 获取项目名称函数
    def get_object_name(self, word_list, input_doc):
        if word_list[0] in ["项目中标结果", "项目结果公告", "项目的结果公告", "项目成交公告", "项目合同公告", "项目评标结果公示",  "项目结果公示", "项目成交公示", "项目采购公告", "项目中标公告", "项目中标公示", "项目招标结果公告", "项目公开招标公告", "项目招标公告"]:
            word_list[0] = word_list[0].replace('项目', '项目)')
            res = re.findall(' ([^\s]+' + word_list[0], input_doc)
            res = [x.replace('（1）', '') for x in res]
        elif word_list[0] in ["采购的成交公示", "采购 的成交公示", "采购的成交公告", "采购的中标公告", "采购的中标公示", "采购结果公告", "采购结果公示", "采购中标公告"]:
            word_list[0] = word_list[0].replace('采购', '采购)')
            res = re.findall(' ([^\s]+' + word_list[0], input_doc)
            res = [x.replace('（1）', '') for x in res]
        elif word_list[0] in ["工程中标公告", "工程中标公示"]:
            word_list[0] = word_list[0].replace('工程', '工程)')
            res = re.findall(' ([^\s]+' + word_list[0], input_doc)
            res = [x.replace('（1）', '') for x in res]
        elif  word_list[0] in ["中标结果公示", "招标结果公示", "中标结果公告", "招标结果公告", "成交结果公告", "成交结果公示", "采购结果公示", "采购结果公告"]:
            res = re.findall(' ([^\s]+)' + word_list[0], input_doc)
            res = [x.replace('（1）', '') for x in res]
        elif word_list[0] == "公示标题 ：":
            res = re.findall('公示标题 ：(.*?[^\s]) ', input_doc)
            for i in range(len(res)):
                s_res = re.findall('.*?项目', res[i])
                if len(s_res) > 0:
                    res[i] = s_res[0]
        else:
            res = re.findall(word_list[0] + '+([^\s].*?) ', input_doc)
            if len(res) == 0:
                res = re.findall(word_list[0] + ' +([^\s].*?) ', input_doc)
        for i in range(len(res)):
            if res[i][-1] == "的":
                res[i] = res[i][:-1]
        remove_x = []
        for x in res:
            if x.find("采购项目编号") == 0 or x.find("项目编号") == 0 or x.find("编号") == 0 or "现将" in x or "中标人" in x or "中选人" in x or "联系方式" in x or "的委托" in x or "发布了" in x or "有异议" in x or "初步成果" in x or "不通过" in x or "业绩为准" in x or "就本次谈判" in x or "谈判文件" in x or "确认到帐" in x or "现对以上" in x or "说明本" in x or "设3个岗" in x or "对本项目" in x or "就本次公开" in x or "单一来源" in x or "评审工作" in x or "已经结束" in x or "日期" in x or "公司名称" in x or "联系人" in x or "就本次采购" in x or "相关证明" in x or "原则" in x or "资格审查" in x or "采购单位" in x or "单价" in x or "招标信息" in x or "合同签订" in x or "招租人" in x or "项目名称" in x or "title" in x or "合同期" in x or "公告时间" in x or "上一条" in x or "首页" in x or "建设单位" in x or "开标时间" in x or "投标" in x or "金额" in x or "交货" in x or "服务期" in x or "包组" in x or x=="子包" or "包一" in x or "包1" in x:
                remove_x.append(x)
        res = [x for x in res if x not in remove_x]
        return res
    
    # 截止时间数据获取及筛选
    def get_purchase_deadline(self, res):
#        print ('截止时间:', res)
        remove_list = []
        for i in range(len(res)):
            res[i] = res[i].replace(' ', '')
            if "至" in res[i]:
                day_res = re.findall('至+(([0-9]{1,2})日)', res[i])
                if len(day_res) > 0:
                    r_list = res[i].split('至')
                    i_res =r_list[0]
                    ni_res = re.findall("(([0-9]{4})+年+([0-9]{1,2})+月)", i_res)
                    if len(ni_res) > 0:
                        ni_res = [(ni_res[0][0] + day_res[0][0], '')]
                elif "日-" in res[i]:
                    res[i] = res[i].replace(' ', '')
                    r_list = res[i].split('-')
                    i_res = r_list[1]
                    ni_res = re.findall("(([0-9]{4})+年+([0-9]{1,2})+月+([0-9]{1,2})+日)", i_res)
                else:
                    r_list = res[i].split('至')
                    if len(r_list) > 1:
                        i_res = r_list[1]
                        ni_res = re.findall("(([0-9]{4})+年+([0-9]{1,2})+月+([0-9]{1,2})+日)", i_res)
                    else:
                        ni_res = []
            else:
                day_res = re.findall("(([0-9]{4})+年+([0-9]{1,2})+月+([0-9]{1,2})+日)", res[i])
                if len(day_res) > 0:
                    ni_res = day_res
                else:
                    ni_res = []
            if len(ni_res) > 0:
                res[i] = ni_res[0][0]
            else:
                remove_list.append(res[i])
        res = [x for x in res if x not in remove_list]
        return res
        
    
    # 获取页面右下角日期
    def get_end_page_date(self, input_doc, rep_list):
        chinese_str = "〇,○,一,二,三,四,五,六,七,八,九,零,拾,壹,贰,叁,肆,伍,陆,柒,捌,玖,貮,两,十"
        res = re.findall("(([0-9]{4}|[" + chinese_str + "]{4})+年+([0-9]{1,2}|[" + chinese_str + "]{1,2})+月+([0-9]{1,2}|[" + chinese_str + "]{1,3})+日)", input_doc)
        chinese_list = ['〇', '○', '一', '二', '三', '四', '五', '六', '七', '八', '九', '零', "拾",
                        '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖', '貮', '两', "十"]
        res_word = ""
        if len(res) > 0:
            res = [x[0] for x in res]
            res_word = res[-1]
            for n in chinese_list:
                if n in res_word:
                    res_word = self.chinese2date(res_word)
                    break
            if "年" in res_word or "月" in res_word:
                res_word = res_word.replace('年', '-')
                res_word = res_word.replace('月', '-')
                res_word = res_word.replace('日', '')
                res_word_list = res_word.split('-')
                if len(res_word_list[1]) == 1:
                    res_word_list[1] = "0" + res_word_list[1]
                if len(res_word_list[2]) == 1:
                    res_word_list[2] = "0" + res_word_list[2]
                res_word = "-".join(res_word_list)
            if res_word != "":
                res_word_list = res_word.split('-')
                if len(res_word_list[1]) == 1:
                    res_word_list[1] = "0" + res_word_list[1]
                if len(res_word_list[2]) == 1:
                    res_word_list[2] = "0" + res_word_list[2]
                res_word = "-".join(res_word_list)
                for rp_x in rep_list:
                    res_word = res_word.replace(rp_x, '')
        else:
            nm_res = re.findall("[0-9]{4}\-[0-9]{1,2}\-[0-9]{1,2}", input_doc)
            if len(nm_res) > 0:
                res_word = nm_res[-1]
                res_word_list = res_word.split('-')
                if len(res_word_list[1]) == 1:
                    res_word_list[1] = "0" + res_word_list[1]
                if len(res_word_list[2]) == 1:
                    res_word_list[2] = "0" + res_word_list[2]
                res_word = "-".join(res_word_list)
                for rp_x in rep_list:
                    res_word = res_word.replace(rp_x, '')
        return res_word
    
    
    # 采购地址获取函数
    """
    源码去除foot部分
    再获取地址数据
    用地址更接近采购人还是代理机构关键词来选择最优的结果
    """
    def get_cgr_adress(self, res, input_doc, tag, rule, result_rule_dict, final_result, json_input):
        star = time.time()
        rep_list = ["\r", "\n", "\t", "\\r", "\\n", "\\t"]
        # 需要删除foot部分的影响
        if 'foot' in json_input["input_doc"]:
            ad_doc = re.findall('foot.+?$', json_input["input_doc"], re.S)[0]
            new_doc = json_input["input_doc"].replace(ad_doc, '')
            ad_doc = self.del_html(new_doc)
            del_list = [x for x in res if x not in ad_doc]
            res = [x for x in res if x not in del_list]
        elif "相关链接" in json_input["input_doc"]:
            ad_doc = re.findall('相关链接.+?$', json_input["input_doc"], re.S)[0]
            new_doc = json_input["input_doc"].replace(ad_doc, '')
            ad_doc = self.del_html(new_doc)
            del_list = [x for x in res if x not in ad_doc]
            res = [x for x in res if x not in del_list]
        #ad代表的是采购人，dl代表的是代理机构，采购地址不能是代理地址，因此要区分
        ad_word = 'False'
        dl_word = "False"
        for adress_word in self.cgr_keyword:
            if adress_word in input_doc:
                ad_word = adress_word
                ad_index = self.get_nearly_word(ad_word, rule, input_doc)
                break
        # 如果文本中有采购机构相关关键词则进入解析
        if ad_word != "False":
            for dl in self.dl_keyword:
                if dl in input_doc:
                    dl_word = dl
                    dl_index = self.get_nearly_word(dl_word, rule, input_doc)
                    break
            #有采购人关键词和代理机构关键词
            if dl_word != "False":
                if ad_index < dl_index:
                    adress_index = [input_doc.rindex(x) for x in res]
                    ad_distance = [x - ad_index for x in adress_index]
                    dl_distance = [dl_index - x for x in adress_index]
                    target_adress = []
                    target_ad_dist = []
                    for i in range(len(adress_index)):
                        if ad_distance[i] > 0 and dl_distance[i] > 0 and ad_distance[i] < dl_distance[i]:
                            target_adress.append(res[i])
                            target_ad_dist.append(ad_distance[i])
                    if len(target_adress) > 1:
                        final_adress = target_adress[target_ad_dist.index(min(target_ad_dist))]
                        result_rule_dict[final_adress] = rule +'sadaa'
                    elif len(target_adress) == 1:
                        final_adress = target_adress[0]
                        result_rule_dict[final_adress] = rule +'sadaa'
                    else:
                        final_adress = ""
                else:
                    adress_index = [input_doc.index(x) for x in res]
                    ad_distance = [x - ad_index for x in adress_index]
                    dl_distance = [dl_index - x for x in adress_index]
                    target_adress = []
                    target_ad_dist = []
                    for i in range(len(adress_index)):
                        if ad_distance[i] > 0 and dl_distance[i] < 0 and ad_distance[i] > dl_distance[i]:
                            target_adress.append(res[i])
                            target_ad_dist.append(ad_distance[i])
                    if len(target_adress) > 1:
                        final_adress = target_adress[target_ad_dist.index(min(target_ad_dist))]
                        result_rule_dict[final_adress] = rule +'sadaa'
                    elif len(target_adress) == 1:
                        final_adress = target_adress[0]
                        result_rule_dict[final_adress] = rule +'sadaa'
                    else:
                        final_adress = ""
            #只有采购机构关键词
            else:
                adress_index = [input_doc.index(x) for x in res]
                ad_distance = [x - ad_index for x in adress_index]
                target_adress = []
                target_ad_dist = []
                for i in range(len(adress_index)):
                    if ad_distance[i] > 0:
                        target_adress.append(res[i])
                        target_ad_dist.append(ad_distance[i])
                if len(target_adress) > 1:
                    final_adress = target_adress[target_ad_dist.index(min(target_ad_dist))]
                    result_rule_dict[final_adress] = rule +'sadaa'
                elif len(target_adress) == 1:
                    final_adress = target_adress[0]
                    result_rule_dict[final_adress] = rule +'sadaa'
                else:
                    final_adress = ""
        else:
            final_adress = "-2" 
        if final_adress != "":
            for rp_x in rep_list:
                final_adress = final_adress.replace(rp_x, '')
            final_result[tag] = [final_adress]
        print ("地址处理耗时：", time.time()-star)
        return final_result, result_rule_dict


    # 获取成交时间
    """
    用正则提取，若是中文则转换成数字
    最后更改日期格式
    """
    def get_deal_time(self, res, tag, rule, final_result, result_rule_dict):
        star = time.time()
        rep_list = ["\r", "\n", "\t", "\\r", "\\n", "\\t"]
        ch_res = res
        if len(ch_res) != 0:
            chinese_str = "〇,○,一,二,三,四,五,六,七,八,九,零,拾,壹,贰,叁,肆,伍,陆,柒,捌,玖,貮,两,十"
            for i in range(len(ch_res)):
                ch_res[i] = ch_res[i].replace('/', '-')
                fr_res = re.findall("(([0-9]{4}|[" + chinese_str + "]{4})+年+([0-9]{1,2}|[" + chinese_str + "]{1,2})+月+([0-9]{1,2}|[" + chinese_str + "]{1,3})+日)", ch_res[i])
                
                if len(fr_res)>0:
                    fr_res = [x[0] for x in fr_res]
                    ch_res[i] = fr_res[0]

            remove_list = [x for x in ch_res if "年" not in x or "月" not in x or "日" not in x]
            ch_res = [x for x in ch_res if x not in remove_list]
            ch_res = [x.split('日')[0] + "日" for x in ch_res]
            
            if len(ch_res) > 0:
                ch_res[0] = ch_res[0].replace('/', '-')
                res_word = ch_res[0]
                chinese_list = ['〇', '○', '一', '二', '三', '四', '五', '六', '七', '八', '九', '零', "拾",
                                '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖', '貮', '两', "十"]
                for n in chinese_list:
                    if n in res_word:
                        res_word = self.chinese2date(res_word)
                        break
            else:
                res_word = ""

        if res_word == "":
            nm_res = res
            for i in range(len(nm_res)):
                fn_res = re.findall("[0-9]{4}\-[0-9]{1,2}\-[0-9]{1,2}", nm_res[i])
                if len(fn_res) > 0:
                    nm_res[i] = fn_res[0]
            remove_list = [x for x in nm_res if x.count('-')!=2]
            nm_res = [x for x in nm_res if x not in remove_list]
            res_word = nm_res[0] if len(nm_res) > 0 else ""

        if res_word != "":
            if "年" in res_word or "月" in res_word:
                res_word = res_word.replace('年', '-')
                res_word = res_word.replace('月', '-')
                res_word = res_word.replace('日', '')
            res_word_list = res_word.split('-')
            if len(res_word_list[1]) == 1:
                res_word_list[1] = "0" + res_word_list[1]
            if len(res_word_list[2]) == 1:
                res_word_list[2] = "0" + res_word_list[2]
            res_word = "-".join(res_word_list)
            for rp_x in rep_list:
                res_word = res_word.replace(rp_x, '')
            if tag in final_result:
                final_result[tag].append(res_word)
            else:
                final_result[tag] = [res_word]
            result_rule_dict[res_word] = rule + "sadaa"
        else:
            if tag not in final_result:
                final_result[tag] = []
        print ("成交时间耗时:", time.time()-star)
        return final_result, result_rule_dict
    
    #获取开标时间
    def get_start_time(self, res):
#        print ('开标时间:', res)
        rep_list = ["\r", "\n", "\t", "\\r", "\\n", "\\t", "。", "上午"]
        ch_res = res
        if len(ch_res) != 0:
            chinese_str = "〇,○,一,二,三,四,五,六,七,八,九,零,拾,壹,贰,叁,肆,伍,陆,柒,捌,玖,貮,两,十"
            for i in range(len(ch_res)):
                ch_res[i] = ch_res[i].replace('/', '-')
                ch_res[i] = ch_res[i].replace('时', ':')
                ch_res[i] = ch_res[i].replace('分', '')
                ch_res[i] = ch_res[i].replace('：', ':')
                ch_res[i] = ch_res[i].replace('\u3000', '')
                fr_res = re.findall("(([0-9]{4}|[" + chinese_str + "]{4})+年+([0-9]{1,2}|[" + chinese_str + "]{1,2})+月+([0-9]{1,2}|[" + chinese_str + "]{1,3})+日+([0-9]{1,2})+\:+([0-9]{1,2}))", ch_res[i])
                if len(fr_res) > 0:
                    fr_res = [x[0] for x in fr_res]
                    ch_res[i] = fr_res[0]

            remove_list = [x for x in ch_res if "年" not in x or "月" not in x or "日" not in x]
            ch_res = [x for x in ch_res if x not in remove_list]
            
            for i in range(len(ch_res)):
                ch_res[i] = ch_res[i].replace('/', '-')
                res_word = ch_res[i]
                chinese_list = ['〇', '○', '一', '二', '三', '四', '五', '六', '七', '八', '九', '零', "拾",
                                '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖', '貮', '两', "十"]
                for n in chinese_list:
                    if n in res_word:
                        res_word = self.chinese2date(res_word)
                        break
                ch_res[i] = res_word
            
        if len(ch_res) == 0:
            nm_res = res
            for i in range(len(nm_res)):
                nm_res[i] = nm_res[i].replace('/', '-')
                nm_res[i] = nm_res[i].replace('时', ':')
                nm_res[i] = nm_res[i].replace('分', '')
                nm_res[i] = nm_res[i].replace('：', ':')
                fn_res = re.findall("(([0-9]{4})\-([0-9]{1,2})\-([0-9]{1,2}).*([0-9]{1,2})+:([0-9]{1,2}))", nm_res[i])
                if len(fn_res) > 0:
                    nm_res[i] = fn_res[0][0]
            remove_list = [x for x in nm_res if x.count('-')!=2]
            nm_res = [x for x in nm_res if x not in remove_list]
            res = nm_res
            res = [x for x in res if x != ""]
        else:
            res = ch_res
            res = [x for x in res if x != ""]
        for i in range(len(res)):
            if "年" in res[i] or "月" in res[i]:
                res[i] = res[i].replace('年', '-')
                res[i] = res[i].replace('月', '-')
                res[i] = res[i].replace('日', '~')
            res[i] = res[i].replace(' ', '~')
            res_word_list = res[i].split('-')
            if len(res_word_list) >= 3:
                if len(res_word_list[1]) == 1:
                    res_word_list[1] = "0" + res_word_list[1]
                if '~' in res_word_list[2]:
                    if len(res_word_list[2].split('~')[0]) == 1:
                        res_word_list[2] = "0" + res_word_list[2]
                res_word = "-".join(res_word_list)
                for rp_x in rep_list:
                    res_word = res_word.replace(rp_x, '')
                res[i] = res_word
        return res

    # 两个关键词的规则函数
    def two_word_match(self,result_dict, word_list, keyword_distance, tag, rule, final_result, distance_num,input_doc,result_rule_dict):
        rep_list = ["\r", "\n", "\t", "\\r", "\\n", "\\t"]
        word1_posi = result_dict[word_list[0]]
        word2_posi = result_dict[word_list[1]]
        for p1 in word1_posi:
            for p2 in word2_posi:
                if p2>p1 and p2-p1<=keyword_distance[rule]:
                    distance_num = p2-p1 if p2-p1<distance_num else distance_num
        if distance_num != 100000000:
            if tag == "购买标书截止日期":
                res = re.findall(word_list[0] + '(.*?)' + word_list[1] + '', input_doc)
#                res = [x for x in res if "至" in x]
                res = self.get_purchase_deadline(res)
            elif tag == "开标日期":
                res = re.findall(word_list[0] + '(.*?)' + word_list[1] + '', input_doc)
                res = self.get_start_time(res)
            else:
                res = re.findall(word_list[0] + '(.*?)' + word_list[1] + '', input_doc)
            num_list = [len(x) for x in res]
            if len(num_list) !=0:
                num = 0
#                num = num_list.index(min(num_list))
                res_word = res[num].strip(' ').replace('：', '')
                if '金额' in tag or '预算' in tag:
                    res_word = self.Money_data(res_word, ' '.join(word_list))
                if tag in final_result and res_word != '':
                    for rp_x in rep_list:
                        res_word = res_word.replace(rp_x, '')
                    if tag == "中标供应商" or tag == "招标人":
                        if word_list[1] == "公司":
                            res_word = res_word + "公司"
                    final_result[tag].append(res_word)
                    if res_word in result_rule_dict:
                        if len(''.join(word_list)) > len(result_rule_dict[res_word]):
                            result_rule_dict[res_word] = ''.join(word_list)
                    else:
                        result_rule_dict[res_word] = ''.join(word_list)
                elif tag not in final_result and res_word != '':
                    for rp_x in rep_list:
                        res_word = res_word.replace(rp_x, '')
                    final_result[tag] = [res_word]
                    if res_word in result_rule_dict:
                        if len(''.join(word_list)) > len(result_rule_dict[res_word]):
                            result_rule_dict[res_word] = ''.join(word_list)
                    else:
                        result_rule_dict[res_word] = ''.join(word_list)

        else:
            if tag not in final_result:
                final_result[tag] = []
        return final_result, result_rule_dict

    # 三个关键词的规则函数
    def three_word_match(self,result_dict, word_list, keyword_distance, tag, rule, final_result, distance_num,input_doc, result_rule_dict):
        rep_list = ["\r", "\n", "\t", "\\r", "\\n", "\\t"]
        word1_posi = result_dict[word_list[0]]
        word2_posi = result_dict[word_list[1]]
        word3_posi = result_dict[word_list[2]]
        for p1 in word1_posi:
            for p2 in word2_posi:
                for p3 in word3_posi:
                    if p2>p1 and p3>p2 and p3-p1<= keyword_distance[rule]:
                        distance_num = p3-p1 if p3-p1<distance_num else distance_num
        if distance_num != 100000000:
            res = re.findall(word_list[1] + '(.*?' + word_list[1] + '.*?)' + word_list[2], input_doc)
            num_list= [len(x) for x in res]
            if len(num_list) > 0:
                num = num_list.index(min(num_list))
                res_word = res[num].strip(' ').replace('：', '')
                if '金额' in tag or '预算' in tag:
                    res_word = self.Money_data(res_word, ' '.join(word_list))
                if tag not in final_result and res_word != '':
                    for rp_x in rep_list:
                        res_word = res_word.replace(rp_x, '')
                    final_result[tag] = [res_word]
                    if res_word in result_rule_dict:
                        if len(''.join(word_list)) > len(result_rule_dict[res_word]):
                            result_rule_dict[res_word] = ''.join(word_list)
                    else:
                        result_rule_dict[res_word] = ''.join(word_list)
                elif tag in final_result and res_word != '':
                    for rp_x in rep_list:
                        res_word = res_word.replace(rp_x, '')
                    final_result[tag].append(res_word)
                    if res_word in result_rule_dict:
                        if len(''.join(word_list)) > len(result_rule_dict[res_word]):
                            result_rule_dict[res_word] = ''.join(word_list)
                    else:
                        result_rule_dict[res_word] = ''.join(word_list)

        else:
            if tag not in final_result:
                final_result[tag] = []
        return final_result, result_rule_dict

    
    # 结果筛选
    """
    根据需要的数据格式用正则进行匹配及格式转换
    用关键词剔除一些无关结果
    有多个结果的按照匹配规则的长度选取（选取规则更长的）
    """
    def Choose_result(self, result_dict, result_rule_dict, html_doc, input_doc):
#        print (result_dict)
        reg_title = re.compile("[0-9]+")
        for tag, result in result_dict.items():
            if len(result) > 0:
                remove_list = []
                            
                if tag == '标题':
                    for res in result:
                        if len(res) > 40:
                            remove_list.append(res)
                if tag == '中标供应商':
                    for res in result:
                        if len(res) > 100 or len(res)<4 or len(re.findall('[0-9]',res)) > 5 or "公示" in res or "招标" in res or "___" in res or "其他" in res or "￥" in res or "贵公司" in res or "相关" in res or "流标" in res or "下浮优惠率" in res or "须知" in res or "结果" in res or res=="第一期投资" or "明细如下" in res or res=="第一轮" or "异议" in res or "约束" in res or "排名" in res or "提交" in res or "复印件" in res or "情况" in res or "协商" in res or "情况" in res or "以此" in res or "及安装" in res or "设备加装" in res or "入围" in res or "下载" in res or "关于" in res or "公章" in res or "退还" in res or "发布" in res or "综合评价" in res or "备注" in res or "批准" in res or "参加" in res or "名称" in res or "免费" in res or "验收" in res or "得分" in res or "意见" in res or "通知" in res or "bidcenter" in res or "名是" in res or "人民币" in res or "售后" in res or "成交" in res or "支付" in res or "发票" in res or "代表人" in res or "数量" in res or "服务费" in res or "合同" in res or "公告" in res or "要求" in res or "候选人" in res or "资质" in res or "资格" in res or "附件" in res or "租金" in res or "比例" in res or "调整规则" in res or "优惠条件" in res or "下浮率" in res or "考虑" in res or len(re.findall('[^0-9][^a-z][^A-Z][^\.]', res)) ==0 or "不足" in res or "失信名单" in res or "感谢" in res or "盈亏" in res or "完善" in res or "评审" in res or "补偿" in res or "采招" in res or "中标" in res or "公告" in res or "采购" in res or "审查" in res or "投标" in res or '联系' in res or "金额" in res or "下发执行" in res or "不分先后" in res or '包组' in res or "供应商" in res or "上述规定" in res or '地址' in res or '负责' in res or len(res)<5 or "万元" in res or "报价" in res or "地址" in res or "谈判" in res or "名单" in res or "提供" in res or "美元" in res or "价格" in res or "响应" in res or ".pdf" in res or "进行" in res or "业绩" in res or "说明" in res or "证明" in res or "质疑" in res or "代码" in res or "为准" in res or "价" in res:
                            remove_list.append(res)
                        elif len(result_dict["项目名称"]) > 0:
                            if res in result_dict["项目名称"]:
                                remove_list.append(res)
                if tag == '项目名称':
                    for i in range(len(result_dict[tag])):
                        if '>' in result_dict[tag][i]:
                            n_result = result_dict[tag][i].replace('>', '')
                            result_rule_dict[n_result] = result_dict[tag][i]
                            result_dict[tag][i] = n_result
                            result[i] = n_result
                    for res in result:
                        if len(res) > 100 or len(res.strip(' ')) < 4 or len(re.sub('编号.+?$', '', res)) < 4 or len(re.findall(".*?([\u4E00-\u9FA5]+).*?", res)) < 1 or res=="自行采购" or "万元" in res or res.find("采购项目编号") == 0 or res.find("项目编号") == 0 or res[-2:]=="公司" or "项目经理" in res or res.find("编号") == 0 or "备注" in res or "竞价时间" in res or "业务公告采购" in res or "进行" in res or "上一条" in res or "下一条" in res or "简要说明" in res or "招标文件" in res or "中标人" in res or "现就" in res or res=="施工招标" or "候选人" in res or "质疑" in res or "业主单位" in res or res =="" or "担任职务" in res or "合同价格" in res or res=="竞争性磋商" or "提交" in res or "基本情况" in res or res=="第一标段" or "获奖情况" in res or "实施地点" in res or "验收合格" in res or "工程规模" in res or "中国采招网" in res or "就本次" in res or "推荐排序" in res or "中选人" in res or "联系方式" in res or "进行的项目" in res or "现将" in res or "本项目" in res or "中标单位" in res or "的委托" in res or res=="询价采购" or "下载链接" in res or "标的名称" in res or "基本概况" in res or "发布了" in res or "有异议" in res or "相关附件" in res or "初步成果" in res or "不通过" in res or "业绩为准" in res or "就本次谈判" in res or "谈判文件" in res or "确认到帐" in res or "现对以上" in res or "说明本" in res or "设3个岗" in res or "对本项目" in res or "就本次公开" in res or "公告期" in res or "单一来源" in res or "评审工作" in res or "评标" in res or "已经结束" in res or "日期" in res or "公司名称" in res or "联系人" in res or "就本次采购" in res or "相关证明" in res or "供应商名称" in res or "原则" in res or "资格审查" in res or "采购单位" in res or "盖章" in res or "单价" in res or "招标信息" in res or "合同签订" in res or "招租人" in res or "项目名称" in res or "title" in res or "合同期" in res or "公告时间" in res or "上一条" in res or "首页" in res or "建设单位" in res or "开标时间" in res or "投标" in res or "金额" in res or "交货" in res or "中标人" in res or "招标人" in res or "服务期" in res or "包组" in res or res=="子包" or "数量/单位" in res or "包一" in res or "包1" in res or len(reg_title.sub('', res))<4 or res=="招标方式" or "推荐" in res or "颁奖" in res or "公示时间" in res or "单位名称" in res or "详细" in res or "数量" in res or res=="预中标结果公示" or res =="标段（包）编号" or "得分" in res or "不发布" in res or res=="服务内容" or "附件" in res or res[0]==")" or res[0]=="）" or "名称" in res:
                            remove_list.append(res)
                if tag == '项目编号':
                    for i in range(len(result)):
                        
                        if '（' in result[i] and '）' in result[i] and result[i].find('）')-result[i].find('（') > 5:
                            try:
                                n_result = re.findall('\（(.+)\）', result[i])[0]
                                result_rule_dict[n_result] = result_rule_dict[result[i]]
                                if len(n_result) > 3:
                                    result_dict[tag][i] = n_result
                                    result[i] = n_result
                            except:
                                result[i] = result[i]
                        elif '）' in result[i] and '（' in result[i] and result[i].find('）') <result[i].find('（'):
                            try:
                                n_result = re.findall('([0-9]*[A-Z]*.*?)\）', result[i])[0]
                                result_rule_dict[n_result] = result_rule_dict[result[i]]
                                if len(n_result) > 3:
                                    result_dict[tag][i] = n_result
                                    result[i] = n_result
                            except:
                                result[i] = result[i]
                        elif '）' in result[i] and '（' not in result[i]:
                            try:
                                n_result = re.findall('([0-9]*[A-Z]*.+)\）', result[i])[0]
                                result_rule_dict[n_result] = result_rule_dict[result[i]]
                                if len(n_result) > 3:
                                    result_dict[tag][i] = n_result
                                    result[i] = n_result
                            except:
                                result[i] = result[i]
                        elif ')' in result[i] and '(' not in result[i]:
                            try:
                                n_result = re.findall('([0-9]*[A-Z]*.+)\)', result[i])[0]
                                result_rule_dict[n_result] = result_rule_dict[result[i]]
                                if len(n_result) > 3:
                                    result_dict[tag][i] = n_result
                                    result[i] = n_result
                            except:
                                result[i] = result[i]
                        elif ']' in result[i] and '[' not in result[i]:
                            try:
                                n_result = re.findall('([0-9]*[A-Z]*.+)\]', result[i])[0]
                                result_rule_dict[n_result] = result_rule_dict[result[i]]
                                if len(n_result) > 3:
                                    result_dict[tag][i] = n_result
                                    result[i] = n_result
                            except:
                                result[i] = result[i]
                        elif '】' in result[i] and '【' not in result[i]:
                            try:
                                n_result = re.findall('([0-9]*[A-Z]*.+)\】', result[i])[0]
                                result_rule_dict[n_result] = result_rule_dict[result[i]]
                                if len(n_result) > 3:
                                    result_dict[tag][i] = n_result
                                    result[i] = n_result
                            except:
                                result[i] = result[i]
                    for res in result:
                        if len(res) > 60 or len(res) < 4:
                            remove_list.append(res)
                        re_res = re.findall('[0-9]|[A-Z]', res)
                        if len(re_res) == 0 or "投标" in res or "采购单位" in res or "单价" in res or "公示如下" in res or "结果如下" in res or "级别：" in res or "项目名称" in res or "得分排名" in res or "公告如下" in res or "建造师" in res or "招标人" in res or "后选人" in res or "评标" in res or "评审" in res or "评委" in res or "不涉及" in res or "任务详情" in res or "为准" in res or "公告期限" in res or "招标公示" in res or "招标公告" in res or "招标结果" in res or "成交" in res:
                            remove_list.append(res)
                if tag == "采购方式":
                    for res in result:
                        if len(res) > 8:
                            remove_list.append(res)
                if tag == "成交时间":
                    title = re.findall("<title>(.+?)<\title>", html_doc, re.S)
                    if len(title) > 0:
                        title = title[0]
                        if "成交公告" not in title and "中标公示" not in title and "中标公告" not in title and "结果公告" not in title and "结果公示" not in title and  "中标结果" not in title:
                            for d_res in result:
                                remove_list.append(d_res)
                            
                if tag == "采购人地址":
                    for res in result:
                        if ".com" in res or '@' in res or "确认" in res or "反馈" in res or "异议" in res or "盖章" in res or "______" in res:
                            remove_list.append(res)
                if tag == '招标人':
                    for i in range(len(result_dict[tag])):
                        if '年' in result_dict[tag][i]:
                            try:
                                d_str = re.findall('\d{4}年.+', result_dict[tag][i])[0]
                                n_result = result_dict[tag][i].replace(d_str, '')
                                result_rule_dict[n_result] = result_rule_dict[result_dict[tag][i]]
                                result[i] = n_result
                                result_dict[tag][i] = n_result
                            except:
                                1                           
                    for res in result:
                        if len(res) > 80 or len(res) < 4 or len(re.sub('[0-9|\-]*', '', res)) < 4 or '审查' in res or "地点" in res or "联系人" in res or "是否" in res or "理由" in res or "代表）" in res or "退还" in res or "许可证" in res or "手续" in res or "发起" in res or "___" in res or "中国采招" in res or "项目" in res or "申请" in res or "说明" in res or "保留" in res or "变更" in res or "情况" in res or "依据" in res or "评委" in res or "进行" in res or "确定" in res or "办理完成" in res or "签发设备" in res or "一份" in res or "有异议" in res or "地址" in res or "交付" in res or "邀请招标" in res or "式：" in res or "分散采购" in res or "供应商" in res or "要求" in res or "公开招标" in res or "负责人" in res or "使用" in res or "公开" in res or "（代理公司" in res or "中国采招网" in res or "评判" in res or "评标" in res or "推荐" in res or "甲方" in res or "预算" in res or "合同" in res or "询价" in res or "需求" in res or "订单" in res or "代理机构" in res or "包组" in res or "规模" in res or "投标" in res or "号码" in res or "投诉" in res or "名称" in res or "文件" in res or "座机" in res or "电话" in res or "签章" in res or "地址" in res or "公章" in res or "盖章" in res or "得分" in res or "提出" in res or "解释" in res or "报价" in res or "中标" in res or "付款" in res or "公告" in res or '联系方式' in res or '通知书' in res or '委托' in res or '受理' in res or '或其招标代理' in res or '采购人' in res or "招标人" in res or "招标公告" in res or "招标公示" in res or "确认" in res or "公布" in res or "结果" in res or "同意" in res or "面积" in res or "代表" in res or "提供" in res or "招标代理" in res:
                            if "项目中心" not in res and "项目服务中心" not in res:
                                remove_list.append(res)
                if tag == '招标代理':
                    for res in result:
                        if len(res) > 80 or len(res) < 4 or "招标人" in res or "现场发放" in res or "异议" in res or "电话" in res or "人员信息" in res or "___" in res or "详见" in res or "投诉" in res or "资格" in res or "审查" in res or "盖章" in res or "公章" in res or "联系" in res or "地址" in res or "名称" in res or "公告" in res or "委托" in res or "质疑" in res or "受理" in res or "合同" in res or "监管" in res or "收费" in res or "支付" in res or "供应商" in res or "服务费" in res or "方式" in res or "收取" in res or "详细" in res or "经办" in res or "负责" in res or "签字" in res or "签名" in res or "文件" in res or "提取" in res or "详见" in res or "公示" in res or "进行" in res:
                            remove_list.append(res)
                if tag == "预算":
                    for res in result:
                        if '%' in res or res == "2020元" or res == "2019元" or res == "2018元":
                            remove_list.append(res)
                if tag == "中标金额":
                    max_leng = 0
                    if len(result) > 0:
                        leng_list = [len(x) for x in result]
                        max_leng = max(leng_list)
                    for res in result:
                        if res == "2020元" or res == "2019元" or res == "2018元":
                            remove_list.append(res)
                        elif len(res) < 5 and max_leng > 5:
                            remove_list.append(res)
                result_dict[tag] = [x for x in result_dict[tag] if x not in remove_list]
                if len(remove_list)  > 0:
                    print (tag + '被移除', remove_list)
                if len(result_dict[tag]) > 1 and tag != "投标人":
                    money = 0
                    if '预算' in tag or '金额' in tag:
                        if tag == "中标金额":
                            zb_money = []
                            for x in result_dict[tag]:
                                if "中标" in result_rule_dict[x] and len(x.replace('元', '')) > 1:
                                    zb_money.append(x)
                                elif "table" in result_rule_dict[x] and len(x.replace('元', '')) >1:
                                    zb_money.append(x)
                            if len(zb_money) > 0:
                                result_dict[tag] = zb_money
                        res_leng = [len(result_rule_dict[r]) for r in result_dict[tag]]
                        num = res_leng.index(max(res_leng))
                        for x in result_dict[tag]:
                            x = result_dict[tag][num]
                            x = x.replace(',', '')
                            if '元' in x:
                                if '万元' in x:
                                    if '.' in x:
                                        x_re = re.findall('[0-9][0-9]*\.[0-9]*', x)[0]
                                        x = str(round(float(x_re)*10000, 2)) + '元' if x.find('万元') > x.find(x_re) and x.find('元') > x.find('万元') else x_re
                                    else:
                                        x_re = re.findall('[0-9][0-9]*', x)[0]
                                        x = str(round(float(x_re)*10000, 2)) + '元' if x.find('万元') > x.find(x_re) and x.find('元') > x.find('万元') else x_re
                                else:
                                    x = re.findall('[0-9][0-9]*\.+[0-9]*', x)[0] + '元' if '.' in x else re.findall('[0-9][0-9]*', x)[0] + '元'
                                result_dict[tag] = [x]
                                money = 1
                                break
                            else:
                                x = re.findall('[0-9][0-9]*\.+[0-9]*', x)[0] + '元' if '.' in x else re.findall('[0-9][0-9]*', x)[0] + '元'
                                result_dict[tag] = [x]
                                money = 1
                                break
                        if money == 0:
                            num_list= [len(result_rule_dict[x]) for x in result_dict[tag]]
                            num = num_list.index(max(num_list))
                            result_dict[tag] = [result_dict[tag][num]]
                    elif tag == "项目名称":
                        num_list = [len(result_rule_dict[x]) for x in result_dict[tag]]
                        num = num_list.index(max(num_list))
                        result_dict[tag] = [result_dict[tag][num]]
                    else:
                        new_res = []
                        new_rule = []
                        for x in result_dict[tag]:
                            if ':' in result_rule_dict[x] or '：' in result_rule_dict[x]:
                                if "候选" not in result_rule_dict[x]:
                                    new_res.append(x)
                                    new_rule.append(result_rule_dict[x])
                        if len(new_res) > 0 and len(new_rule) > 0:
                            num_list = [len(y) for y in new_rule]
                            num = num_list.index(max(num_list))
                            result_dict[tag] = [new_res[num]]
                        else:
                            new_res = []
                            new_rule = []
                            for x in result_dict[tag]:
                                if 'table' in result_rule_dict[x]:
                                    new_res.append(x)
                                    new_rule.append(result_rule_dict[x])
                        if len(new_res) > 0 and len(new_rule) > 0:
                            num_list = [len(y) for y in new_rule]
                            num = num_list.index(max(num_list))
                            result_dict[tag] = [new_res[num]]
                        else:
                            num_list= [len(result_rule_dict[x]) for x in result_dict[tag]]
                            num = num_list.index(max(num_list))
                            result_dict[tag] = [result_dict[tag][num]]
                else:
                    if '预算' in tag or '金额' in tag:
                        for x in result_dict[tag]:
                            x = x.replace(',', '')
                            if '元' in x:
                                if '万元' in x:
                                    if '.' in x:
                                        x_re = re.findall('[0-9][0-9]*\.[0-9]*', x)[0]
                                        x = str(round(float(x_re)*10000, 2)) + '元' if x.find('万元') > x.find(x_re) and x.find('元') > x.find('万元') else x_re
                                    else:
                                        x_re = re.findall('[0-9][0-9]*', x)[0]
                                        x = str(round(float(x_re)*10000, 2)) + '元' if x.find('万元') > x.find(x_re) and x.find('元') > x.find('万元') else x_re
                                else:
                                    x = re.findall('[0-9][0-9]*\.+[0-9]*', x)[0] + '元' if '.' in x else re.findall('[0-9][0-9]*', x)[0] + '元'
                                result_dict[tag] = [x]
                                
            if len(result_dict[tag]) == 0:
                if tag != "废标":
                    unknow_list = self.unknow_dict[tag]
                    un_num = 0
                    for unknow_word in unknow_list:
                        if unknow_word in input_doc:
                            un_num += 1
                    if un_num == 0:
                        result_dict[tag] = ["-2"]
                    else:
                        result_dict[tag] = ['-1']
            elif len(result_dict[tag]) > 0:
                if result_dict[tag][0] == "":
                    result_dict[tag] = ["-2"]
        return result_dict

    # 主函数
    def get_main_item(self, json_str):
        start_time = time.time()
        print ('开始时间', datetime.datetime.now())
        # 建立ac自动机.decode()
        """
        参数没有传入则为空list，两个关键词的list按元素长度排列
        """
        rep_list = ["\r", "\n", "\t", "\\r", "\\n", "\\t"]
        json_input = json.loads(json_str)
        if "notice_type" in json_input:
            model_type = json_input["notice_type"]
        else:
            model_type = ""
        if model_type == "变更公告":
            print ("变更公告解析")
            final_result = change_ac.Ac_match().get_main_item(json_str)
            return final_result
        else:
            if "input_dict" in json_input:
                input_dict = json_input["input_dict"]
            else:
                input_dict = {}
            if "sup_keyword_list" in json_input:
                sup_keyword_list = json_input["sup_keyword_list"]   #中标信息表格临近关键词
                sup_list1 = [x for x in sup_keyword_list if "候选" not in x and "投标" not in x]
                sup_list2 = [x for x in sup_keyword_list if "候选" in x or "投标" in x]
                sup_list11 = [x for x in sup_list1 if "中标" in x or "成交" in x or "评标" in x or "如下" in x]
                sup_list12 = [x for x in sup_list1 if "中标" not in x and "成交" not in x and "评标" not in x and "如下" not in x]
                sup_list11 = sorted(sup_list11, key = lambda i:len(i),reverse=True)
                sup_list12 = sorted(sup_list12, key = lambda i:len(i),reverse=True)
                sup_list2 = sorted(sup_list2, key = lambda i:len(i),reverse=True)
                sup_keyword_list1 = sup_list11+sup_list12+sup_list2 #按关键词长度排序
                if "中标供应商名称、联系地址及中标金额：" in sup_keyword_list1:
                    sup_keyword_list1.remove("中标供应商名称、联系地址及中标金额：")
                sup_keyword_list = ["中标供应商名称、联系地址及中标金额："]
                sup_keyword_list = sup_keyword_list + sup_keyword_list1
            else:
                sup_keyword_list = []
            if "sup_table_dict" in json_input:
                sup_table_dict = json_input["sup_table_dict"]   # 中标信息表格表头规则
            else:
                sup_table_dict = {}
            if "tbr_keyword_list" in json_input:
                tbr_keyword_list = json_input["tbr_keyword_list"]   #应标人表格临近关键词
                tbr_keyword_list = sorted(tbr_keyword_list, key = lambda i:len(i),reverse=True)
            else:
                tbr_keyword_list = []
            if "tbr_headword_list" in json_input:
                tbr_headword_list = json_input["tbr_headword_list"] #应标人表格表头规则
            else:
                tbr_headword_list = []
            if "notice_id" in json_input:
                notice_id = json_input["notice_id"]
            else:
                notice_id = ""
            if "notice_time" in json_input:
                post_date = json_input["notice_time"]
            else:
                post_date = ""
            if "url" in json_input:
                url = json_input["url"]
            else:
                url = ""
            if "notice_type" in json_input:
                status = json_input["notice_type"]
                if status == "预招标公告" and "废标" not in input_dict:
                    input_dict["废标"] = self.fb_rule
            else:
                status = ""
            if "input_doc" in json_input:
                input_doc = self.del_html(json_input["input_doc"], input_dict, status)
            else:
                input_doc = " "
            
            if "notice_title" in json_input:
                notice_title = json_input['notice_title']
            else:
                notice_title = '-1'
            print ("数据加载", datetime.datetime.now())
            
            # 获取附件下载地址
            download_url_list = self.get_download_url(json_input["input_doc"])
            
            # 采招网大部分是不含：，因此需要增加去掉冒号的规则
            if "采招网" in input_doc or "采 招网" in input_doc or "采招 网" in input_doc  or "中国 采招" in input_doc:
                for key in input_dict:
                    for i in range(len(input_dict[key])):
                        if input_dict[key][i] != "采购方：" and input_dict[key][i] != "采购方:":
                            input_dict[key].append(input_dict[key][i].replace(":", ""))
                            input_dict[key].append(input_dict[key][i].replace("：", ""))
                word_remove = []
                for x in input_dict["项目名称"]:
                    if x[-2:] == "工程" or x == "工程项目":
                        word_remove.append(x)
                input_dict["项目名称"] = [x for x in input_dict["项目名称"] if x not in word_remove]
                input_dict["招标人"] = [x for x in input_dict["招标人"] if x not in ["甲方"]]
                input_dict["中标供应商"] = [x for x in input_dict["中标供应商"] if x not in ["乙方"]]
            if "华润集团守正电子招标平台" in input_doc:
                pro_rule = input_dict["项目名称"]
                pro_rule = [x for x in pro_rule if "项目名称" not in x and "标段名称" not in x and "标的名称" not in x and "标包名称" not in x]
                input_dict["项目名称"] = pro_rule
            Match_Ac = ahocorasick.Automaton()
            # 获取各个规则的距离
            keyword_distance = {}
            for rule_list in input_dict.values():
                for rule in rule_list:
                    keyword_list = str(rule).split('|')
                    dis_list = [[x.split('_')[0], x.split('_')[1]] for x in keyword_list if '_' in x]
                    dis_list += [[x, 50] for x in keyword_list if '_' not in x]
                    for d_rule in dis_list:
                        keyword_distance[d_rule[0]] = float(d_rule[1])
            # 把规则关键词传入ac
            for rule_word in keyword_distance.keys():
                for index,word in enumerate(str(rule_word).split('#')):
                    Match_Ac.add_word(word, (index, word))
            # ac建立完成
            Match_Ac.make_automaton()
            # 获取ac结果
            result_dict = self.get_ac_result(Match_Ac, input_doc)
            print ("ac结果获取", datetime.datetime.now())
            # 进行规则匹配
            final_result = {}
            result_rule_dict = {}
            for tag, rule_list in input_dict.items():
                for rule in rule_list:
                    rule = rule.split('_')[0]
                    word_list =  rule.split('#')
                    tag_status = True
    
                    for word in word_list:
                        if word not in result_dict:
                            tag_status = False
                    
                    if tag_status:
                        distance_num = 100000000
                        for i in range(len(word_list)):
                            word_list[i] = word_list[i].replace('(', '\(')
                            word_list[i] = word_list[i].replace(')', '\)')
                        if len(word_list) == 2:
                            final_result,result_rule_dict = self.two_word_match(result_dict, word_list, keyword_distance, tag, rule, final_result, distance_num,input_doc, result_rule_dict)
                        elif len(word_list) == 3:
                            final_result,result_rule_dict = self.three_word_match(result_dict, word_list, keyword_distance, tag, rule, final_result, distance_num,input_doc, result_rule_dict)
                        elif len(word_list) == 1:
                            if tag == '标题':
                                res = re.findall(' ([^\s].*?' + word_list[0] + ')', input_doc)
                            elif tag == "项目名称":
                                res = self.get_object_name(word_list, input_doc)
                            elif tag == "购买标书截止日期":
                                res = re.findall(word_list[0] + '+([^\s].*?) ', input_doc)
                                if len(res) == 0:
                                    res = re.findall(word_list[0] + ' +([^\s].*?) ', input_doc)
                                res = self.get_purchase_deadline(res)
                            elif tag == "开标日期":
                                res = re.findall(word_list[0] + '+([^\s].*?)  ', input_doc)
                                if len(res) == 0:
                                    res = re.findall(word_list[0] + ' +([^\s].*?)  ', input_doc)
                                res = self.get_start_time(res)
                            else:
                                res = re.findall(word_list[0] + '+([^\s].*?) ', input_doc)
                                if len(res) == 0:
                                    res = re.findall(word_list[0] + ' +([^\s].*?) ', input_doc)
                                if len(res) >0:
                                    if tag in ["中标供应商", "招标人", "招标代理"]:
                                        for i in range(len(res)):
                                            if '公司' in res[i] or "医院" in res[i] or "局" in res[i] or "队" in res[i] or "政府" in res[i] or "馆" in res[i] or "院" in res[i] or "处" in res[i] or "大学" in res[i] or "办公室" in res[i] or "街道办" in res[i] or "小学" in res[i] or "中学" in res[i] or "中心" in res[i]:
                                                res[i] = self.get_company(res[i])
                                    if tag == "项目编号":
                                        res = [x for x in res if x != "分散"]
                                        for i in range(len(res)):
                                            if "，" in res[i]:
                                                try:
                                                    res[i] = re.findall('.*?\，', res[i])[0]
                                                except:
                                                    res[i] = res[i]
                                            elif "；" in res[i]:
                                                try:
                                                    res[i] = re.findall('.*?\；', res[i])[0]
                                                except:
                                                    res[i] = res[i]
                            if len(res) > 0 and tag != "投标人":
                                if tag == "采购人地址":
                                    final_result, result_rule_dict = self.get_cgr_adress(res, input_doc, tag, rule, result_rule_dict, final_result, json_input)
                                elif tag == "成交时间" or tag == "发布时间" or tag == "需求时间":
                                    final_result, result_rule_dict = self.get_deal_time(res, tag, rule, final_result, result_rule_dict)
    #                                if tag == "开标日期":
    #                                    print ("开标日期", res)
                                # 除去上面两个标签的其他标签提取
                                else:
                                    num_list = [len(x) for x in res]
                                    res_word = res[num_list.index(min(num_list))].strip('：')
                                    if '金额' in tag or '预算' in tag:
                                        if "超出" in res_word or "无效" in res_word or "服务费" in res_word:
                                            res_word = ""
                                        else:
                                            res_word = self.Money_data(res_word, word_list[0])
                                    if tag not in final_result and res_word != '':
                                        for rp_x in rep_list:
                                            res_word = res_word.replace(rp_x, '')
                                        final_result[tag] = [res_word]
                                        if rule == "编号" or rule == "编号：" or rule == "编号:":
                                            if res_word in result_rule_dict:
                                                if len(rule) > len(result_rule_dict[res_word]):
                                                    result_rule_dict[res_word] = rule
                                            else:
                                                result_rule_dict[res_word] = rule
                                        elif '：' in rule or ':' in rule:
                                            if res_word in result_rule_dict:
                                                if len(result_rule_dict[res_word]) < len(rule+'sadaa'): 
                                                    if "中标" in rule or "项目名称" in rule or "成交" in rule:
                                                        result_rule_dict[res_word] = rule+'sadaasad'
                                                    else:
                                                        result_rule_dict[res_word] = rule+'sadaa'
                                            else:
                                                if "中标" in rule or "项目名称" in rule or "成交" in rule:
                                                    result_rule_dict[res_word] = rule+'sadaasad'
                                                else:
                                                    result_rule_dict[res_word] = rule+'sadaa'
                                        else:
                                            if res_word in result_rule_dict:
                                                if len(rule) > len(result_rule_dict[res_word]):
                                                    result_rule_dict[res_word] = rule
                                            else:
                                                result_rule_dict[res_word] = rule
                                    elif tag in final_result and res_word != '':
                                        for rp_x in rep_list:
                                            res_word = res_word.replace(rp_x, '')
                                        final_result[tag].append(res_word)
                                        if rule == "编号" or rule == "编号：" or "rule" == "编号:":
                                            if res_word in result_rule_dict:
                                                if len(rule) > len(result_rule_dict[res_word]):
                                                    result_rule_dict[res_word] = rule
                                            else:
                                                result_rule_dict[res_word] = rule
                                        elif '：' in rule or ':' in rule:
                                            if res_word in result_rule_dict:
                                                if len(result_rule_dict[res_word]) < len(rule+'sadaa'): 
                                                    if "中标" in rule or "项目名称" in rule or "成交" in rule:
                                                        result_rule_dict[res_word] = rule+'sadaasad'
                                                    else:
                                                        result_rule_dict[res_word] = rule+'sadaa'
                                            else:
                                                if "中标" in rule or "项目名称" in rule or "成交" in rule:
                                                    result_rule_dict[res_word] = rule+'sadaasad'
                                                else:
                                                    result_rule_dict[res_word] = rule+'sadaa'
                                        else:
                                            if res_word in result_rule_dict:
                                                if len(rule) > len(result_rule_dict[res_word]):
                                                    result_rule_dict[res_word] = rule
                                            else:
                                                result_rule_dict[res_word] = rule
                            elif tag == "投标人" and len(res) > 0:
                                res = list(set(res))
                                if "投标人" not in final_result:
                                    final_result[tag] = []
                                for x in res:
                                    if x not in final_result[tag]:
                                        if "盖章" not in x and "中标" not in x and "候选" not in x and "标包" not in x and "包组" not in x and "具体详见" not in x and "技术要求" not in x and "公示" not in x:
                                            final_result[tag].append(x)
                            else:
                                if tag not in final_result:
                                    final_result[tag] = []
                    else:
                        if tag not in final_result:
                            final_result[tag] = []
            
            clean_doc = input_doc.replace(' ', '')
            if "中标供应商" in final_result:
                if len(final_result["中标供应商"])!= 0:
                    for tar_res in final_result["中标供应商"]:
                        tar_rule = result_rule_dict[tar_res].replace('sadaasad','')
                        tar_rule = tar_rule.replace('sadaa','')
                        if tar_rule + tar_res in clean_doc:
                            word_index = clean_doc.index(tar_rule + tar_res)
                            print (word_index)
                            if word_index > 2:
                                if clean_doc[word_index-2:word_index] == "候选":
                                    result_rule_dict[tar_res]  = result_rule_dict[tar_res].replace('sadaasad','')
                                    result_rule_dict[tar_res]  = result_rule_dict[tar_res].replace('sadaa','')
                                    result_rule_dict[tar_res] = "候选" + result_rule_dict[tar_res] 
    
            """
            规则未匹配到成交时间则用右下角的日期
            """
            if post_date == "":   
                post_date = self.get_end_page_date(input_doc, rep_list)
            print ('初步结果', final_result)
    #####        print (result_rule_dict)
            print ("初步解析完成：", datetime.datetime.now())
            # 供应商，招标人中有：，获取：后的结果
            if "中标供应商" in final_result:
                final_result["中标供应商"] = [x for x in final_result["中标供应商"] if "地址" not in x and "得分" not in x]
                gys_list = final_result["中标供应商"]
                if len(gys_list) > 0:
                    for i in range(len(gys_list)):
                        if "：" in gys_list[i]:
                            new_gys = re.findall("：(.+?$)", gys_list[i])
                            if len(new_gys) > 0:
                                if new_gys[0] in result_rule_dict:
                                    if len(result_rule_dict[new_gys[0]]) < len(result_rule_dict[gys_list[i]]):
                                        result_rule_dict[new_gys[0]] = result_rule_dict[gys_list[i]]
                                    gys_list[i] = new_gys[0]
                                else:
                                    result_rule_dict[new_gys[0]] = result_rule_dict[gys_list[i]]
                                    gys_list[i] = new_gys[0]
                                
                        elif ":" in gys_list[i]:
                            new_gys = re.findall(":(.+?$)", gys_list[i])
                            if len(new_gys) > 0:
                                if new_gys[0] in result_rule_dict:
                                    if len(result_rule_dict[new_gys[0]]) < len(result_rule_dict[gys_list[i]]):
                                        result_rule_dict[new_gys[0]] = result_rule_dict[gys_list[i]]
                                    gys_list[i] = new_gys[0]
                                else:
                                    result_rule_dict[new_gys[0]] = result_rule_dict[gys_list[i]]
                                    gys_list[i] = new_gys[0]
                final_result["中标供应商"] = gys_list
            
            if "招标人" in final_result:
                zbr_list = final_result["招标人"]
                zbr_list = [zbr for zbr in zbr_list if "项目编号：" not in zbr and "项目名称：" not in zbr and "地址:" not in zbr and "地址：" not in zbr]
                if len(zbr_list) > 0:
                    for i in range(len(zbr_list)):
                        if "：" in zbr_list[i]:
                            new_zbr = re.findall("：(.+?$)", zbr_list[i])
                            if len(new_zbr) > 0:
                                if new_zbr[0] in result_rule_dict:
                                    if len(result_rule_dict[new_zbr[0]]) < len(result_rule_dict[zbr_list[i]]):
                                        result_rule_dict[new_zbr[0]] = result_rule_dict[zbr_list[i]]
                                    zbr_list[i] = new_zbr[0]
                                else:
                                    result_rule_dict[new_zbr[0]] = result_rule_dict[zbr_list[i]]
                                    zbr_list[i] = new_zbr[0]
                                
                        elif ":" in zbr_list[i]:
                            new_zbr = re.findall(":(.+?$)", zbr_list[i])
                            if len(new_zbr) > 0:
                                if new_zbr[0] in result_rule_dict:
                                    if len(result_rule_dict[new_zbr[0]]) < len(result_rule_dict[zbr_list[i]]):
                                        result_rule_dict[new_zbr[0]] = result_rule_dict[zbr_list[i]]
                                    zbr_list[i] = new_zbr[0]
                                else:
                                    result_rule_dict[new_zbr[0]] = result_rule_dict[zbr_list[i]]
                                    zbr_list[i] = new_zbr[0]
                final_result["招标人"] = zbr_list
            
            if "招标代理" in final_result:
                zbdl_list = final_result["招标代理"]
                if len(zbdl_list) > 0:
                    for i in range(len(zbdl_list)):
                        if "：" in zbdl_list[i]:
                            new_zbdl = re.findall("：(.+?$)", zbdl_list[i])
                            if len(new_zbdl) > 0:
                                result_rule_dict[new_zbdl[0]] = result_rule_dict[zbdl_list[i]]
                                zbdl_list[i] = new_zbdl[0]
                                
                        elif ":" in zbdl_list[i]:
                            new_zbdl = re.findall(":(.+?$)", zbdl_list[i])
                            if len(new_zbdl) > 0:
                                result_rule_dict[new_zbdl[0]] = result_rule_dict[zbdl_list[i]]
                                zbdl_list[i] = new_zbdl[0]
                final_result["招标代理"] = zbdl_list
    #        print ("招标人、供应商处理")
            # 获取匹配结果报错信息
            content = ''
            for tag in final_result:
                final_result[tag] = list(set(final_result[tag]))
                if len(final_result[tag]) > 1:
                    content += tag + ' --- 匹配结果过多；   '
                if '金额' in tag or '预算' in tag:
                    if len(final_result[tag]) > 0:
                        for tag_res in final_result[tag]:
                            if '.' in tag_res:
                                num_res = re.findall('[0-9][0-9]*\.[0-9].*?元', tag_res)
                                if len(num_res) == 0:
                                    num_res = re.findall('[0-9][0-9]*\.[0-9]*', tag_res)
                            else:
                                num_res = re.findall('[0-9].*?元', tag_res)
                                if len(num_res) == 0:
                                    num_res = re.findall('[0-9][0-9]*', tag_res)
                            if len(num_res) == 0:
                                content += tag + ' --- 结果有非金额；   '
                if '标题' in tag:
                    if len (final_result[tag]) > 80:
                        content += '标题过长；   '
                   
            # 加入表格数据
            """
            选择第一个出现的关键词作为临近关键词
            有关键词的用关键词表格函数(含keyword)，若含关键词的函数获取不到结果则用第一个表格的数据
            无关键词则用第一个表格数据
            """
            print ("表格获取:", datetime.datetime.now())
            mt_word = False
            for m_word in sup_keyword_list:
                if m_word in json_input["input_doc"]:
                    mt_word = m_word
                    break 
            if mt_word != False:
                table_final = table_model.get_table_keyword_new(json_input["input_doc"], mt_word, sup_table_dict)
            if mt_word == False:
    #            print('td')
                table_final = table_model.get_table_td_new(json_input["input_doc"], sup_table_dict)
                if len(table_final) == 0:
    #                print ('th')
                    table_final = table_model.get_table_th(json_input["input_doc"], sup_table_dict)
            else:
                if len(table_final) == 0:
    #                print ('td2')
                    table_final = table_model.get_table_td_new(json_input["input_doc"], sup_table_dict)
    #                print (table_final)
                    if len(table_final) == 0:
    #                    print('th2')
                        table_final = table_model.get_table_th(json_input["input_doc"], sup_table_dict)
            # 表格获取的数据格式筛选及转换
    #        print (table_final)
            if "预算" in table_final:
                table_final["预算"] = self.Money_data(table_final["预算"], '')
            
            if "中标金额" in table_final:
                table_final["中标金额"] = self.Money_data(table_final["中标金额"], '')
            print (mt_word)
            print ('表格数据:', table_final)
            if len(table_final) != 0:
                for tag, tag_res in table_final.items():
                    if tag_res!= "":
                        final_result[tag].append(tag_res)
                        result_rule_dict[tag_res] = 'tabletable'
            print ("结果对应规则：", result_rule_dict)
            # 获取投标人
            tbr_list = []
            for tbr_word in tbr_keyword_list:
                if tbr_word in json_input["input_doc"]:
                    print ("投标人关键词", tbr_word)
                    tbr_list = table_model.get_tbr_table(tbr_word, json_input["input_doc"], tbr_headword_list)
                    print (tbr_list)
                    tbr_list = [x for x in tbr_list if '%' not in x and x != '' and "比例" not in x and "分数" not in x and "供应商" not in x and "得分" not in x and "标包" not in x and "包组" not in x and "具体详见" not in x and "技术要求" not in x and "公示" not in x and "姓名" not in x and "投标人" not in x and "报价" not in x and "评分" not in x and "A" not in x and "B" not in x and "序号" not in x and "/" not in x and "原因" not in x and "依据" not in x and "名称" not in x]
                    if len(tbr_list) > 0:
                        break
    #        print ("匹配筛选:", datetime.datetime.now())
            # 匹配结果筛选
            final_result = self.Choose_result(final_result, result_rule_dict, json_input["input_doc"], input_doc) 
    
            for tag in final_result:
                if len(final_result[tag])>0:
                    final_result[tag] = [x.replace(' ', '') for x in final_result[tag]]
                    
            # 招标人区域获取
            area_start_time = time.time()
            adr_dict = {}
            sup_adr_dict = {}
            if "招标人" in final_result:
#                com_adr = {"code": 0}
                com_adr = partitionByName("".join(final_result["招标人"]), "")
    #            print ("投标人地址：", com_adr)
                if com_adr["code"] == 0:
                    adr_dict["省"] = com_adr["province"] if "province" in com_adr else ""
                    adr_dict["市"] = com_adr["city"] if "city" in com_adr else ""
                    adr_dict["区"] = com_adr["area"] if "area" in com_adr else ""
                    adr_dict["街道"] = com_adr["street"] if "street" in com_adr else ""
                else:
                    adr_dict["省"] = ""
                    adr_dict["市"] = ""
                    adr_dict["区"] = ""
                    adr_dict["街道"] = ""
            else:
                adr_dict["省"] = ""
                adr_dict["市"] = ""
                adr_dict["区"] = ""
                adr_dict["街道"] = ""
            for x in adr_dict:
                if adr_dict[x] == None:
                    adr_dict[x] = ""
            if "中标供应商" in final_result:
                if final_result["中标供应商"][0] != "-1" and final_result["中标供应商"][0] != "-2":
                    sup_adr = partitionByName(final_result["中标供应商"][0], "")
#                    sup_adr = {"code": 0}
        #            print ("供应商地址", sup_adr)
                    if sup_adr["code"] == 0:
                        sup_adr_dict["省"] = sup_adr["province"] if "province" in sup_adr else ""
                        sup_adr_dict["市"] = sup_adr["city"] if "city" in sup_adr else ""
                        sup_adr_dict["区"] = sup_adr["area"] if "area" in sup_adr else ""
                        sup_adr_dict["街道"] = sup_adr["street"] if "street" in sup_adr else ""
                    else:
                        sup_adr_dict["省"] = ""
                        sup_adr_dict["市"] = ""
                        sup_adr_dict["区"] = ""
                        sup_adr_dict["街道"] = ""
            else:
                sup_adr_dict["省"] = ""
                sup_adr_dict["市"] = ""
                sup_adr_dict["区"] = ""
                sup_adr_dict["街道"] = ""
            for x in sup_adr_dict:
                if sup_adr_dict[x] == None:
                    sup_adr_dict[x] = ""
            area_end_time = time.time()
            print ("地域获取耗时:%s" % str(area_end_time-area_start_time))
            final_result["招标人区域"] = adr_dict
            final_result["供应商区域"] = sup_adr_dict
            if len(tbr_list) > 0:
                final_result["投标人"] = tbr_list
            if "投标人" in final_result:
                if len(final_result["投标人"]) == 0:
                    final_result["投标人"] = ["-2"]
            # 判断是否为废标
            if "废标" in final_result:
                final_result["废标"] = ['True'] if len(final_result["废标"]) > 0 else ["False"]
                
            # 特殊字符替换及中标金额计算
            """
            下浮率中标金额计算： 预算*(1-下浮率)
            折扣率计算金额： 预算*折扣率
            """
    #        print ("金额数据处理")
            rep_str = ['1', '2', '3', '4','5','6','7','8','9','0', '；', '，', '【', '】', '“', '。', '？']
            if "招标人" in final_result:
                if final_result["招标人"][0] != '-1' and final_result["招标人"][0] != '-2':
                    for rx in rep_str:
                        final_result["招标人"][0] = final_result["招标人"][0].replace(rx, '')
                    if final_result["招标人"][0][0] == ")" or final_result["招标人"][0][0] == "）" or final_result["招标人"][0][0] == "、":
                        final_result["招标人"][0] = final_result["招标人"][0][1:]
                    simp_zbr = compNameToShort(final_result["招标人"][0])
                    final_result["招标人简称"] = [simp_zbr]
                else:
                    final_result["招标人简称"] = [final_result["招标人"][0]]
            if "中标供应商" in final_result:
                if final_result["中标供应商"][0] != '-1' and final_result["中标供应商"][0] != '-2':
                    for rx in rep_str:
                        final_result["中标供应商"][0] = final_result["中标供应商"][0].replace(rx, '')
                    if final_result["中标供应商"][0][0] == ")" or final_result["中标供应商"][0][0] == "）" or final_result["中标供应商"][0][0] == "、":
                        final_result["中标供应商"][0] = final_result["中标供应商"][0][1:]
                    simp_zbgys = compNameToShort(final_result["中标供应商"][0])
                    final_result["中标供应商简称"] = [simp_zbgys]
                else:
                    final_result["中标供应商简称"] = [final_result["中标供应商"][0]]
            if "投标人" in final_result:
                simp_tbr_list = []
                for i in range(len(final_result["投标人"])):
                    simp_tbr = compNameToShort(final_result["投标人"][i])
                    simp_tbr_list.append(simp_tbr)
                final_result["投标人简称"] = simp_tbr_list
                    
            if "中标金额" in final_result:
                if '%' in final_result["中标金额"][0]:
                    if final_result["预算"][0] != '-1' and final_result["预算"][0] != "-2":
                        try:
                            budget_num = final_result["预算"][0].replace('万元', '')
                            budget_num = float(budget_num.replace('元', ''))
                            discount = float(final_result["中标金额"][0].replace('%', ''))/100
                            if "折扣率" in input_doc:
                                new_cost = budget_num*discount
                            elif "下浮率" in input_doc:
                                new_cost = budget_num*(1-discount)
                            else:
                                new_cost = budget_num*discount if discount > 0.3 else budget_num*(1-discount)
                            final_result["中标金额"] = [new_cost]
                        except:
                            1
                    else:
                        final_result["中标金额"] = ["-2"]
            if "中标金额" in final_result:
                final_result["中标金额"][0] = str(final_result["中标金额"][0]).replace('元', '')
            if "预算" in final_result:
                final_result["预算"][0] = str(final_result["预算"][0]).replace('元', '')
            if "项目名称" in final_result:
                final_result["项目名称"][0] = final_result["项目名称"][0].replace(':', '')
                final_result["项目名称"][0] = final_result["项目名称"][0].replace('：', '')
                final_result["项目名称"][0] = final_result["项目名称"][0].replace(';', '')
                final_result["项目名称"][0] = final_result["项目名称"][0].replace('；', '')
                if final_result["项目名称"][0][-1] in ["(", "（", "【", "["]:
                    final_result["项目名称"][0] = final_result["项目名称"][0][:-1]
            if "项目编号" in final_result:
                final_result["项目编号"][0] = final_result["项目编号"][0].replace('，', '')
                final_result["项目编号"][0] = final_result["项目编号"][0].replace('；', '')
                final_result["项目编号"][0] = final_result["项目编号"][0].replace('、', '')
                final_result["项目编号"][0] = final_result["项目编号"][0].replace(')：', '')
                final_result["项目编号"][0] = final_result["项目编号"][0].replace('。', '')
            if "开标日期" in final_result:
                final_result["开标日期"][0] = str(final_result["开标日期"][0]).replace('~', ' ')
            for key, values in final_result.items():
                if key not in ["招标人区域", "供应商区域"]:
                    if len(values) > 0:
                        if values[0] == '':
                            final_result[key] = ['-1']
                    else:
                        final_result[key] = ['-1']
            if "废标" in final_result:
                if final_result["废标"][0] == 'True':
                    status = "废标"
                    final_result["招标时间"] = ["-2"]
    
            if status == "招标公告":
                status = "招标"
            elif status == "预招标公告":
                status = "预招标"
            elif status == "中标公告":
                status = "中标"
            if status == "招标":
                final_result["招标时间"] = [post_date]
            else:
                final_result["招标时间"] = ["-2"]
            final_result["公告时间"] = [post_date]
            if "成交时间" in final_result:
                if final_result["成交时间"][0] in ["-1", "-2"] and post_date!="":
                    final_result["成交时间"]= [post_date]
            final_result["notice_id"] = notice_id
            final_result["url"] = [url]
            final_result["附件链接"] = download_url_list
            if "项目名称" in final_result:
                if final_result["项目名称"][0] == '-1' or final_result["项目名称"][0] == '-2' or final_result["项目名称"][0]=="":
                    new_pro_name = self.get_obj_name_from_title(notice_title)
                    pro_black_word = [";", "；", ":", "：", "的成交公告", "的中标公告", "的招标公告",  '合同公告', '中标公告', '成交公告', '中选公告', '招标结果公告', '中标结果公告', '成交结果公告', '结果公告', '中标（成交）公告', '资格后审结果公示', '合同公示', '比选人公示', '结果公示', '比选结果公示', "评标结果公示", "成交公示", "中标结果公示",  "公开招标公告", "招标结果公示", '中标候选人公示', '公开招标评审公示', '结果公示', '中标公示', '中标结果', '开标记录']
                    pro_black_word = sorted(pro_black_word, key = lambda i:len(i),reverse=True)
                    for word in pro_black_word:
                        if word in new_pro_name:
                            new_pro_name = new_pro_name.replace(word, '')
                    if len(new_pro_name) > 0:
                        if new_pro_name[0] == "[" and new_pro_name[-1] == "]":
                            new_pro_name = new_pro_name.replace('[', "")
                            new_pro_name = new_pro_name.replace(']', "")
                        if new_pro_name[0] == "[" and "]" not in new_pro_name:
                            new_pro_name = new_pro_name.replace('[', "")
                        if new_pro_name[0] == "【" and new_pro_name[-1] == "】":
                            new_pro_name = new_pro_name.replace('【', "")
                            new_pro_name = new_pro_name.replace('】', "")
                        if new_pro_name[0] == "【" and "】" not in new_pro_name:
                            new_pro_name = new_pro_name.replace('【', '')
                        if new_pro_name[-1] in ["(", "（", "【", "["]:
                            new_pro_name = new_pro_name[:-1]
                    else:
                        new_pro_name = "-1"
    #                print ("标题获取名称", new_pro_name)
                    if len(new_pro_name) > 3:
                        final_result["项目名称"][0] = new_pro_name
                if "项目编号" in final_result:
                    if final_result["项目编号"][0] != "-1" and final_result["项目编号"] != "-2" and final_result["项目名称"] != "-1" and final_result["项目名称"] != "-1":
                        replace_name = final_result["项目名称"][0].replace(final_result["项目编号"][0], "")
                        if len(replace_name) < 3 and len(final_result["项目名称"][0]) > 3:
                            final_result["项目名称"][0] = final_result["项目名称"][0]
                        else:
                            final_result["项目名称"][0] = replace_name
                    if final_result["项目名称"][0] == "":
                        final_result["项目名称"][0] = final_result["项目编号"][0]
            
    #        if len(input_doc) < 200:
    #            print ("文本内容", input_doc)
            final_result["公告类型"] = [status]
            nes_list = ["项目编号", "项目名称", "中标金额", "预算", "招标人", "中标供应商", "招标代理", "采购方式", "招标人区域", "供应商区域", "投标人", "招标时间", "公告时间", "公告类型", "成交时间", "中标供应商简称", "投标人简称", "购买标书截止日期", "开标日期", "发布时间"]
            for n_key in nes_list:
                if n_key not in final_result:
                    final_result[n_key] = ['-2']
            if final_result["中标金额"][0] == '-2':
                final_result["中标金额"][0] = -2
            if final_result["预算"][0] == '-2':
                final_result["预算"][0] = -2
            if final_result["中标金额"][0] == '-1':
                final_result["中标金额"][0] = -1
            if final_result["预算"][0] == '-1':
                final_result["预算"][0] = -1
            if "项目名称" in final_result:
                is_bag = self.bag_judge(final_result["项目名称"][0])
            else:
                is_bag = self.bag_judge(' ')
            final_result['is_bag'] = [is_bag]
            # 保存文本（线上用， 本地注释）
            print ('文本保存')
            es_access_doc = 'http://47.112.138.184:9202'
            es_index_doc = 'htmltext'
            doc_type_doc= 'doc'
            save_data = {'notice_id': final_result['notice_id'], 'text':input_doc}
            html_text.write_text(save_data, es_access_doc,es_index_doc,doc_type_doc)
    
            print ('结果：', final_result)
            print ('结束时间', datetime.datetime.now())
            end_time = time.time()
            print ("运行耗时：%s" % str(end_time-start_time))
            return final_result

if __name__=="__main__":
    ac = Ac_match()
    data = {"input_dict":{"项目编号":["采购项目编号：","标段（包）编号：","标段编号：","项目编号:","项目编号","招标编号：","招标编号:","招标编号","采购编号：","采购编号:","采购编号","机构编号：","采购计划编号：","代理编号：","委托编号：","招标人编号：","招标人编号:","采购人编号：","项目受理编号：","招标文件编号：","招标文件编号:","采购文件编号","招标项目编号：","竞价编号：","文件编号：","工程编号：","工程编号:","工程编号","项目统一代码：","项目统一代码:","公告编号","比选代理机构编号：","编号：","项目编号：","采购代理编号：","采购项目编码：","项目[#]的招评标_30","招标代理编号：","编号:","招标代理机构编号：","公告编号:","标的编号","采购 编号：","比选代理编号：","项目包编号：","询价编号：","采购项目编号（采购计划编号）：","项目名称及项目编号：","公共资源交易编号：","采购项目名称及编号：","招标编号为","采购项目名称及招标编号：","采购项目名称及标书编号：","采购项目名称及项目编号：","标包编号：","政府采购编号 ：","合同编号：","\u00A0项目标号：","询价书编号：","采购公示编号：","比选编号:","采购代理机构编号：","计划编号：","比选编号：","单一来源编号：","合同编号","招标编号为#的_30","项目编号为#的_30","项目编号为","编号为：","项目号：","项目编码：","包件编码:","项目标号：","合同号（订单号）：","招标项目名称及标书编号：","项 目 编 号：","入场登记号："]},"input_doc":"<!doctype html>\n<html>\n <head> \n  <meta charset=\"utf-8\"> \n  <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"> \n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no\"> \n  <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ --> \n  <title>更正公告-详情页面</title> \n  <meta name=\"renderer\" content=\"webkit\"> \n  <link rel=\"shortcut icon\" href=\"/favicon.ico\" type=\"image/x-icon\"> \n  <meta name=\"SiteName\" content=\"广州公共资源交易中心\"> \n  <meta name=\"SiteDomain\" content=\"ggzy.gz.gov.cn\"> \n  <meta name=\"SiteIDCode\" content=\"4401000105\"> \n  <meta name=\"ColumnName\" content=\"更正公告\"> \n  <meta name=\"ColumnDescription\" content=\"更正公告\"> \n  <meta name=\"ColumnKeywords\" content=\"更正公告\"> \n  <meta name=\"ColumnType\" content=\"更正公告\"> \n  <meta name=\"ArticleTitle\" content=\"中新广州知识城合作项目服务管理中心知识城中安置区（凤山花园）物业管理服务采购项目更正公告(CZ2020-0140)\"> \n  <meta name=\"PubDate\" content=\"2020-02-27\" 14:03:58> \n  <meta name=\"ContentSource\" content=\"广州公共资源交易中心\"> \n  <link href=\"/r/cms/www/default/lib/bootstrap/css/bootstrap.min.css\" type=\"text/css\" rel=\"stylesheet\"> \n  <link href=\"/r/cms/www/default/lib/font-awesome/css/font-awesome.min.css\" type=\"text/css\" rel=\"stylesheet\"> \n  <link href=\"/r/cms/www/default/lib/simple-line-icons/simple-line-icons.min.css\" type=\"text/css\" rel=\"stylesheet\"> \n  <link href=\"/r/cms/www/default/css/components.min.css\" type=\"text/css\" rel=\"stylesheet\"> \n  <link href=\"/r/cms/www/default/css/public.css\" type=\"text/css\" rel=\"stylesheet\"> \n  <link href=\"/r/cms/www/default/css/common.css\" type=\"text/css\" rel=\"stylesheet\"> \n  <script src=\"/r/cms/www/default/lib/jquery/jquery.min.js\"></script> \n  <script src=\"/r/cms/www/default/lib/bootstrap/js/bootstrap.min.js\"></script> \n  <script src=\"/r/cms/jqueryUI/jquery-ui.js\" type=\"text/javascript\"></script> \n  <script src=\"/r/cms/front.js\" type=\"text/javascript\"></script> \n  <script src=\"/r/cms/www/default/js/util/IEVersion.js\" type=\"text/javascript\"></script> \n  <script type=\"text/javascript\">\n        $(function () {\n            Cms.checkPerm(\"\", \"673741\");\n            Cms.collectCsi(\"\", \"collectCsiDiv\", \"collect_csi\", \"673741\");\n            Cms.attachment(\"\", \"673741\", \"0\", \"attach\");\n            Cms.viewCount(\"\", \"673741\");\n            Cms.siteFlow(\"\", location.href, document.referrer, \"true\");\n        });\n    </script> \n </head> \n <body> \n  <div class=\"wrap\"> \n   <div class=\"nav_banner\"> \n    <div class=\"logo_content\"> \n     <div class=\"logo_info clearfix\"> \n      <a href=\"/html/index.html\"> \n       <div class=\"logo\">\n        <img src=\"/r/cms/www/default/images/nav_logo.png\">\n       </div> \n       <div class=\"logo-text\"> \n        <div class=\"logo-title\">\n         广州公共资源交易中心\n        </div> \n        <div class=\"logo-subtitle\" style=\"font-size: 10.5px;\">\n         GuangZhou Public Resources Trading Center \n        </div> \n       </div> </a> \n     </div> \n    </div> \n    <div class=\"menu-list\"> \n     <div class=\"nav\"> \n      <ul class=\"clearfix\"> \n       <li id=\"root\"> <a href=\"/html/index.html\" target=\"_self\"><span>首 页</span></a> </li> \n       <li id=\"root200\"> <a href=\"/html/xyxx/\" target=\"_self\"><span>信用信息</span></a> </li> \n       <li id=\"root231\"> <a href=\"/html/fwznbszy/\" target=\"_self\"><span>服务指南</span></a> </li> \n       <li id=\"root364\"> <a href=\"/jsgc/index.jhtml\" target=\"_self\"><span>政策法规</span></a> </li> \n       <li id=\"root234\"> <a href=\"/html/jyzxjj.html\" target=\"_self\"><span>关于我们</span></a> </li> \n      </ul> \n      <div class=\"top_logo top_logo_other\"> \n       <script src=\"/thirdparty/My97DatePicker/WdatePicker.js\" type=\"text/javascript\"></script> \n       <script>\n\t//$(function() {\n\t//\t$(\"input[name=q]\").autocomplete({\n\t//\t\t source: \"/hdjlmyzjjggb/index.jhtml\",\n\t//\t\t minLength: 2,\n\t//\t\t max:5,\n\t//\t\t delay:400,\n\t//\t\t autoFocus: true,\n\t//\t\t select: function(e, ui) {\n\t//\t\t\t $(\"input[name='q']\").val(ui.item.value);\n\t//\t\t\t $(\"#searchForm\").submit();\n\t//\t\t }\n\t//\t});\n\t//});\n\n\n\nfunction submitgjss(){\n\n\n\t\n\n\n\t\n\t $(\"#searchForm\").submit();\n\t\n}\n\n\n</script> \n       <!-- 搜索_begin --> \n       <form action=\"/gjss/index.jhtml\" target=\"_blank\" id=\"searchForm\"> \n        <input name=\"q\" placeholder=\"请输入关键字\" maxlength=\"50\" autocomplete=\"off\" class=\"seach_ptext\"> \n        <input type=\"button\" onclick=\"submitgjss()\" class=\"searchBtn\" value=\"搜索\"> \n       </form> \n       <!-- 搜索_end --> \n      </div> \n     </div> \n    </div> \n   </div> \n   <div class=\"layer-container\"> \n    <div class=\"page-bar page-bar-detail\"> \n     <ul class=\"page-breadcrumb\"> \n      <li> <i class=\"icon-home\"></i> <a href=\"/html/index.html\" style=\"color: black\">首页</a> </li> \n      <li> / <span>交易业务</span> </li> \n      <li> / <a href=\"/html/jyywzfcggg/\" style=\"color: black\">政府采购</a> </li> \n      <li> / <a href=\"/html/jyywzfcggg/\" style=\"color: black\">政府采购（公开招标、邀请招标、竞争性谈判、竞争性磋商、询价、单一来源）</a> </li> \n      <li> / <a href=\"/jyywzfcgzfcggggzgg/index.jhtml\" style=\"color: black\">更正公告</a> </li> / \n      <span>正文</span> \n     </ul> \n    </div> \n    <div class=\"detail\"> \n     <div class=\"countDownDiv\"> \n      <div class=\"countDown\"> \n       <span></span> 剩余： \n       <strong id=\"dayId\"></strong> 天 \n       <strong id=\"hourId\"></strong> 小时 \n       <strong id=\"minId\"></strong> 分钟 \n       <strong id=\"secId\"></strong> 秒 \n      </div> \n     </div> \n     <div class=\"detail-msg clearfix\"> \n      <div class=\"detail-msg-left\"> \n       <span>发布时间：2020-02-27 14:03</span> \n       <span>来源：广州公共资源交易中心</span> \n      </div> \n      <div class=\"detail-msg-right\"> \n       <div style=\"position:relative;\" class=\"bdsharebuttonbox\"> \n        <span>分享到：</span> \n        <a href=\"#\" class=\"bds_more\" data-cmd=\"more\"></a> \n        <a href=\"#\" class=\"bds_tsina\" data-cmd=\"tsina\" title=\"分享到新浪微博\"></a> \n        <a href=\"#\" class=\"bds_weixin\" data-cmd=\"weixin\" title=\"分享到微信\"></a> \n        <a href=\"#\" class=\"bds_qzone\" data-cmd=\"qzone\" title=\"分享到QQ空间\"></a> \n        <a href=\"#\" class=\"bds_sqq\" data-cmd=\"sqq\" title=\"分享到QQ好友\"></a> \n       </div> \n      </div> \n     </div> \n     <div class=\"detail-content content\"> \n      <div class=\"detail-content-main\"> \n       <p class=\"text-indent\"></p>\n       <p class=\"MsoNormal\" style=\"text-align:center;margin:0pt;mso-outline-level:1;\" align=\"center\"><b><span style=\"font-size:24pt;font-family:宋体;font-weight:bold;mso-spacerun:'yes';mso-font-kerning:1.0000pt;\">CZ2020-0140</span></b><b><span style=\"font-size:24pt;font-family:宋体;font-weight:bold;mso-spacerun:'yes';mso-font-kerning:1.0000pt;\"><span style=\"font-family:宋体;\">更正公告（</span></span></b><b><span style=\"font-size:24pt;font-family:宋体;font-weight:bold;mso-spacerun:'yes';mso-font-kerning:1.0000pt;\"><span style=\"font-family:宋体;\">二</span></span></b><b><span style=\"font-size:24pt;font-family:宋体;font-weight:bold;mso-spacerun:'yes';mso-font-kerning:1.0000pt;\"><span style=\"font-family:宋体;\">）</span></span></b><b><span style=\"font-size:24pt;font-family:宋体;font-weight:bold;mso-spacerun:'yes';mso-font-kerning:1.0000pt;\">\n          <!--?xml:namespace prefix = \"o\" ns = \"urn:schemas-microsoft-com:office:office\" /-->\n          <o:p></o:p></span></b></p> \n       <p class=\"MsoNormal\" style=\"margin:0pt;line-height:150%;\"><b><span style=\"font-size:12pt;font-family:宋体;font-weight:bold;line-height:150%;mso-spacerun:'yes';mso-font-kerning:1.0000pt;\">\n          <o:p>\n           &nbsp;\n          </o:p></span></b></p> \n       <p class=\"MsoNormal\" style=\"margin:0pt;line-height:150%;\"><b><span style=\"font-size:12pt;font-family:宋体;font-weight:bold;line-height:150%;mso-spacerun:'yes';mso-font-kerning:1.0000pt;\"><span style=\"font-family:宋体;\">项目名称：</span></span></b><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\"><span style=\"font-family:宋体;\">中新广州知识城合作项目服务管理中心中安置区（凤山花园）物业管理服务采购项目</span></span><b><span style=\"font-size:12pt;font-family:宋体;font-weight:bold;line-height:150%;mso-spacerun:'yes';mso-font-kerning:1.0000pt;\">\n          <o:p></o:p></span></b></p> \n       <p class=\"MsoNormal\" style=\"margin:0pt;line-height:150%;\"><b><span style=\"font-size:12pt;font-family:宋体;font-weight:bold;line-height:150%;mso-spacerun:'yes';mso-font-kerning:1.0000pt;\"><span style=\"font-family:宋体;\">项目编号：</span></span></b><span style=\"font-size:10.5pt;font-family:宋体;mso-spacerun:'yes';mso-font-kerning:1.0000pt;mso-bidi-font-family:Tahoma;\">&nbsp;</span><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\">CZ2020-0140</span><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\">\n         <o:p></o:p></span></p> \n       <p class=\"MsoNormal\" style=\"margin:0pt;line-height:150%;\"><b><span style=\"font-size:12pt;font-family:宋体;font-weight:bold;line-height:150%;mso-spacerun:'yes';mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\"><span style=\"font-family:宋体;\">采购方式：</span></span></b><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\"><span style=\"font-family:宋体;\">公开招标</span></span><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\">\n         <o:p></o:p></span></p> \n       <p class=\"MsoNormal\" style=\"margin:0pt;line-height:150%;\"><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:1.0000pt;\">\n         <o:p>\n          &nbsp;\n         </o:p></span></p> \n       <p class=\"MsoNormal\" style=\"margin:0pt;line-height:150%;\"><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:1.0000pt;\"><span style=\"font-family:宋体;\">各有关供应商：</span></span><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:1.0000pt;\">\n         <o:p></o:p></span></p> \n       <p class=\"MsoNormal\" style=\"text-align:left;margin:0pt;line-height:150%;text-indent:26.25pt;mso-pagination:widow-orphan;\"><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\"><span style=\"font-family:宋体;\">我中心就</span></span><u><span style=\"font-size:12pt;text-decoration:underline;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;text-underline:single;\">2020年2月27日</span></u><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\"><span style=\"font-family:宋体;\">发布的采购文件内容作如下澄清、修改和补充。</span></span><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\">\n         <o:p></o:p></span></p> \n       <p class=\"MsoNormal\" style=\"text-align:left;margin:0pt;line-height:150%;text-indent:26.25pt;mso-pagination:widow-orphan;\"><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\">\n         <o:p>\n          &nbsp;\n         </o:p></span></p> \n       <p class=\"MsoNormal\" style=\"text-align:left;margin:0pt 4pt 0pt 33pt;line-height:150%;text-indent:-4.65pt;mso-pagination:widow-orphan;mso-list:l0 level1 lfo1;\"><span style=\"font-size:12pt;font-family:宋体;font-weight:bold;mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\"><span style=\"mso-list:Ignore;\">一、<span>&nbsp;</span></span></span><b><span style=\"font-size:12pt;font-family:宋体;font-weight:bold;line-height:150%;mso-spacerun:'yes';mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\"><span style=\"font-family:宋体;\">更正事项、内容</span></span></b><b><span style=\"font-size:12pt;font-family:宋体;font-weight:bold;line-height:150%;mso-spacerun:'yes';mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\">\n          <o:p></o:p></span></b></p> \n       <p class=\"MsoNormal\" style=\"text-align:left;margin:0pt 4pt 0pt 33pt;line-height:150%;mso-pagination:widow-orphan;\"><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\"><span style=\"font-family:宋体;\">原</span></span><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\">CZ2020-0140</span><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\"><span style=\"font-family:宋体;\">更正公告项目名称有误，现更正为：</span>“</span><b><span style=\"font-size:12pt;font-family:宋体;font-weight:bold;line-height:150%;mso-spacerun:'yes';mso-font-kerning:1.0000pt;\"><span style=\"font-family:宋体;\">项目名称：</span></span></b><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\"><span style=\"font-family:宋体;\">中新广州知识城合作项目服务管理中心中安置区（凤山花园）物业管理服务采购项目</span>”</span><span style=\"font-size:10.5pt;font-family:宋体;background:#ffffff;color:#ff0000;mso-spacerun:'yes';mso-font-kerning:1.0000pt;mso-shading:#ffffff;\">\n         <o:p></o:p></span></p> \n       <p class=\"MsoNormal\" style=\"text-align:left;margin:0pt 4pt 0pt 33pt;line-height:150%;mso-pagination:widow-orphan;\"><span style=\"font-size:10.5pt;font-family:宋体;background:#ffffff;color:#ff0000;mso-spacerun:'yes';mso-font-kerning:1.0000pt;mso-shading:#ffffff;\">\n         <o:p>\n          &nbsp;\n         </o:p></span></p> \n       <p class=\"MsoNormal\" style=\"text-align:left;margin:0pt 4pt 0pt 33pt;line-height:150%;text-indent:-4.65pt;mso-pagination:widow-orphan;mso-list:l0 level1 lfo1;\"><span style=\"font-size:12pt;font-family:宋体;font-weight:bold;mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\"><span style=\"mso-list:Ignore;\">二、<span>&nbsp;</span></span></span><b><span style=\"font-size:12pt;font-family:宋体;font-weight:bold;line-height:150%;mso-spacerun:'yes';mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\"><span style=\"font-family:宋体;\">开标时间</span></span></b><b><span style=\"font-size:12pt;font-family:宋体;font-weight:bold;line-height:150%;mso-spacerun:'yes';mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\">\n          <o:p></o:p></span></b></p> \n       <p class=\"MsoNormal\" style=\"layout-grid-mode:char;text-align:left;margin:0pt 0pt 0pt 24pt;line-height:150%;mso-pagination:widow-orphan;\"><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:1.0000pt;mso-bidi-font-family:Arial;\"><span style=\"font-family:宋体;\">提交投标文件截止时间和开标时间不变。</span></span><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:1.0000pt;mso-bidi-font-family:Arial;\">\n         <o:p></o:p></span></p> \n       <p class=\"MsoNormal\" style=\"layout-grid-mode:char;text-align:left;margin:0pt 0pt 0pt 24pt;line-height:150%;mso-pagination:widow-orphan;\"><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:1.0000pt;mso-bidi-font-family:Arial;\"><span style=\"font-family:宋体;\">解密完成后及时公布开标结果。</span></span><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\">\n         <o:p></o:p></span></p> \n       <p class=\"MsoNormal\" style=\"text-align:left;margin:0pt 4pt 0pt 33pt;line-height:150%;text-indent:-4.65pt;mso-pagination:widow-orphan;mso-list:l0 level1 lfo1;\"><span style=\"font-size:12pt;font-family:宋体;font-weight:bold;mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\"><span style=\"mso-list:Ignore;\">三、<span>&nbsp;</span></span></span><b><span style=\"font-size:12pt;font-family:宋体;font-weight:bold;line-height:150%;mso-spacerun:'yes';mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\"><span style=\"font-family:宋体;\">更正日期：</span></span></b><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:14.0000pt;mso-bidi-font-family:Tahoma;\">2020</span><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\"><span style=\"font-family:宋体;\">年</span>2月27日</span><b><span style=\"font-size:12pt;font-family:宋体;font-weight:bold;line-height:150%;mso-spacerun:'yes';mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\">\n          <o:p></o:p></span></b></p> \n       <p class=\"MsoNormal\" style=\"text-align:left;margin:0pt 4pt 0pt 33pt;line-height:150%;text-indent:-4.65pt;mso-pagination:widow-orphan;mso-list:l0 level1 lfo1;\"><span style=\"font-size:12pt;font-family:宋体;font-weight:bold;mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\"><span style=\"mso-list:Ignore;\">四、<span>&nbsp;</span></span></span><b><span style=\"font-size:12pt;font-family:宋体;font-weight:bold;line-height:150%;mso-spacerun:'yes';mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\"><span style=\"font-family:宋体;\">采购人、采购代理机构的名称、地址和联系方式</span></span></b><b><span style=\"font-size:12pt;font-family:宋体;font-weight:bold;line-height:150%;mso-spacerun:'yes';mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\">\n          <o:p></o:p></span></b></p> \n       <p class=\"MsoNormal\" style=\"layout-grid-mode:char;text-align:left;margin:0pt 0pt 0pt 45pt;line-height:150%;text-indent:-21pt;mso-pagination:widow-orphan;mso-list:l1 level1 lfo2;\"><span style=\"font-size:12pt;font-family:宋体;mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\"><span style=\"mso-list:Ignore;\">1.<span>&nbsp;</span></span></span><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\"><span style=\"font-family:宋体;\">采购人联系方式</span></span><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\">\n         <o:p></o:p></span></p> \n       <p class=\"MsoNormal\" style=\"layout-grid-mode:char;text-align:left;margin:0pt;line-height:150%;text-indent:27pt;mso-pagination:widow-orphan;mso-char-indent-count:2.2500;\"><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\"><span style=\"font-family:宋体;\">名称</span>: 中新广州知识城合作项目服务管理中心</span><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\">\n         <o:p></o:p></span></p> \n       <p class=\"MsoNormal\" style=\"layout-grid-mode:char;text-align:left;margin:0pt;line-height:150%;text-indent:27pt;mso-pagination:widow-orphan;mso-char-indent-count:2.2500;\"><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\"><span style=\"font-family:宋体;\">联系地址</span>:</span><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:1.0000pt;\">&nbsp;</span><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:1.0000pt;\"><span style=\"font-family:宋体;\">广州市黄埔区（知识城）凤湖一路凤湖一街</span> 5 号综合楼</span><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\">\n         <o:p></o:p></span></p> \n       <p class=\"MsoNormal\" style=\"layout-grid-mode:char;text-align:left;margin:0pt;line-height:150%;text-indent:27pt;mso-pagination:widow-orphan;mso-char-indent-count:2.2500;\"><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\"><span style=\"font-family:宋体;\">联系人</span>:</span><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:1.0000pt;\">&nbsp;</span><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:1.0000pt;\"><span style=\"font-family:宋体;\">陈智苏</span></span><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:1.0000pt;\">&nbsp;&nbsp;&nbsp;</span><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:1.0000pt;\"><span style=\"font-family:宋体;\">联系电话：</span>(020)</span><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:1.0000pt;\">&nbsp;82119622</span><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\">\n         <o:p></o:p></span></p> \n       <p class=\"MsoNormal\" style=\"layout-grid-mode:char;text-align:left;margin:0pt 0pt 0pt 45pt;line-height:150%;text-indent:-21pt;mso-pagination:widow-orphan;mso-list:l1 level1 lfo2;\"><span style=\"font-size:12pt;font-family:宋体;mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\"><span style=\"mso-list:Ignore;\">2.<span>&nbsp;</span></span></span><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\"><span style=\"font-family:宋体;\">采购代理机构联系方式</span></span><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\">\n         <o:p></o:p></span></p> \n       <p class=\"MsoNormal\" style=\"layout-grid-mode:char;text-align:left;margin:0pt;line-height:150%;text-indent:24pt;mso-pagination:widow-orphan;mso-char-indent-count:2.0000;\"><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\"><span style=\"font-family:宋体;\">名称：广州公共资源交易中心</span></span><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\">\n         <o:p></o:p></span></p> \n       <p class=\"MsoNormal\" style=\"layout-grid-mode:char;text-align:left;margin:0pt;line-height:150%;text-indent:24pt;mso-pagination:widow-orphan;mso-char-indent-count:2.0000;\"><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\"><span style=\"font-family:宋体;\">地点：</span></span><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:1.0000pt;\"><span style=\"font-family:宋体;\">广州市天河区天润路</span>333号</span><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\">&nbsp;&nbsp;&nbsp;&nbsp; 邮编：</span><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:1.0000pt;\">510630</span><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\">\n         <o:p></o:p></span></p> \n       <p class=\"MsoNormal\" style=\"layout-grid-mode:char;text-align:left;margin:0pt;line-height:150%;text-indent:24pt;mso-pagination:widow-orphan;mso-char-indent-count:2.0000;\"><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\"><span style=\"font-family:宋体;\">项目联系人：马永乐</span> &nbsp;&nbsp;<span style=\"font-family:宋体;\">联系电话：（</span>020）82086585 </span><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:0.0000pt;mso-bidi-font-family:Tahoma;\">\n         <o:p></o:p></span></p> \n       <p class=\"MsoNormal\" style=\"text-align:left;margin:0pt;line-height:150%;text-indent:26.25pt;mso-pagination:widow-orphan;\"><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:1.0000pt;\">\n         <o:p>\n          &nbsp;\n         </o:p></span></p> \n       <p class=\"MsoNormal\" style=\"text-align:left;margin:0pt;line-height:150%;text-indent:26.25pt;mso-pagination:widow-orphan;\"><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:1.0000pt;\"><span style=\"font-family:宋体;\">更正公告为招标文件的组成部分，如更正公告有重新发布电子招标文件的，供应商应下载最新发布的电子招标文件制作投标文件。</span></span><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:1.0000pt;\">\n         <o:p></o:p></span></p> \n       <p class=\"MsoNormal\" style=\"text-align:right;margin:0pt 0pt 0pt 70.9pt;line-height:150%;text-indent:-70.9pt;\" align=\"right\"><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:1.0000pt;\"><span style=\"font-family:宋体;\">广州公共资源交易中心</span></span><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:1.0000pt;\">\n         <o:p></o:p></span></p> \n       <p class=\"MsoNormal\" style=\"text-align:right;margin:0pt 0pt 0pt 70.9pt;line-height:150%;text-indent:-70.9pt;\" align=\"right\"><span style=\"font-size:12pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:1.0000pt;\">2020年2月27日</span><span style=\"font-size:14pt;font-family:宋体;line-height:150%;mso-spacerun:'yes';mso-font-kerning:1.0000pt;\">\n         <o:p></o:p></span></p> \n       <!--EndFragment-->\n       <p align=\"left\"><span style=\"color:black;font-size:16px;\"><strong>附件：</strong></span></p>\n       <h3><a id=\"wtxy\" href=\"http://www.gzggzy.cn/file/2020/2/交易平台/政府采购附件信息/委托协议（盖章版）_yangl_1581577412069.pdf\">1.委托代理协议</a></h3>\n       <h3><a>2.采购文件 （</a><a id=\"fj0\" href=\"http://www.gzggzy.cn/file/MidData/2b832b83-17084cb5777-f528764d624db129b32c21fbca0cb8d6/68846884-1701e3206f7-f528764d624db129b32c21fbca0cb8d6/PackedFiles/_20200227140018.GZZF\">招标文件.GZZF</a>、<a id=\"fj1\" href=\"http://www.gzggzy.cn/file/MidData/2b832b83-17084cb5777-f528764d624db129b32c21fbca0cb8d6/68846884-1701e3206f7-f528764d624db129b32c21fbca0cb8d6/PackedFiles/%D5%D0%B1%EA%CE%C4%BC%FE%D5%FD%CE%C4.pdf\">招标文件.pdf</a>、<a id=\"fj2\" href=\"http://www.gzggzy.cn/file/MidData/2b832b83-17084cb5777-f528764d624db129b32c21fbca0cb8d6/68846884-1701e3206f7-f528764d624db129b32c21fbca0cb8d6/PackedFiles/%D5%D0%B1%EA%CE%C4%BC%FE%D5%FD%CE%C4.doc\">招标文件.doc</a>）</h3>\n       <h3><a id=\"zfcggysbszy\" target=\"_blank\" href=\"http://www.gzggzy.cn/cms/wz/view/index/layout3/index.jsp?siteId=1&amp;infoId=477651&amp;channelId=222\">3.政府采购供应商企业信息登记办事指引</a></h3>\n       <h3><a id=\"zfcgzy\" target=\"_blank\" href=\"http://www.gzggzy.cn/cms/wz/view/index/layout3/index.jsp?siteId=1&amp;infoId=183057&amp;channelId=89\">4.广州公共资源交易中心关于公共资源交易服务费标准及相关指引的说明</a></h3>\n       <h3><a id=\"gysxypjbz\" target=\"_blank\" href=\"http://www.gzggzy.cn/file/editor/2017/1/20170119113658_493/公共资源交易综合信用指数评价标准.docx\">5.公共资源交易综合信用指数评价标准</a></h3>\n       <h3><a id=\"qyxydfjssjtz\" target=\"_blank\" href=\"http://www.gzggzy.cn/file/editor/2016/12/20161209173621_967/关于公共资源交易综合信用指数计算时间的说明.docx\">6.关于公共资源交易综合信用指数计算时间的说明</a></h3>\n       <p align=\"left\"><span style=\"color:black;font-size:16px;\"><strong>其它附件：</strong></span></p>\n       <h3><br><a>（无）</a></h3>\n       <p></p> \n      </div> \n      <!--<p class=\"text-right\">落款发布人：马永乐</p>--> \n      <!--<p class=\"text-right\">落款时间：</p>--> \n     </div> \n     <div class=\"add-list\"> \n      <strong class=\"title\">关联公告</strong> \n      <!--<ul>--> \n      <!----> \n      <!--<li><a href=\"http://ggzy.gz.gov.cn/jyywzfcgzfcggggzgg/673611.jhtml\" title=\"中新广州知识城合作项目服务管理中心知识城中安置区（凤山花园）物业管理服务采购项目更正公告(CZ2020-0140)\" target=\"_blank\">--> \n      <!--中新广州知识城合作项目服务管理中心知识城中安置区（凤山花园）物业管理服务采购项目更正公告(CZ2020-0140)--> \n      <!--</a></li>--> \n      <!----> \n      <!--<li><a href=\"http://ggzy.gz.gov.cn/jyywzfcgzfcgcggg/673260.jhtml\" title=\"中新广州知识城合作项目服务管理中心知识城中安置区（凤山花园）物业管理服务采购项目(CZ2020-0140)\" target=\"_blank\">--> \n      <!--中新广州知识城合作项目服务管理中心知识城中安置区（凤山花园）物业管理服务采购项目(CZ2020-0140)--> \n      <!--</a></li>--> \n      <!----> \n      <!--</ul>--> \n      <table style=\"left: auto\" class=\"table public-table firstChild-center\"> \n       <thead> \n        <tr> \n         <th style=\"width:80px\">标题</th> \n         <th style=\"width:140px\">发布时间</th> \n        </tr> \n       </thead> \n       <tbody> \n        <tr> \n         <td><a href=\"http://ggzy.gz.gov.cn/jyywzfcgzfcggggzgg/673611.jhtml\" class=\"title\">中新广州知识城合作项目服务管理中心知识城中安置区（凤山花园）物业管理服务采购项目更正公告(CZ2020-0140)</a></td> \n         <td>2020-02-27 </td> \n        </tr> \n        <tr> \n         <td><a href=\"http://ggzy.gz.gov.cn/jyywzfcgzfcgcggg/673260.jhtml\" class=\"title\">中新广州知识城合作项目服务管理中心知识城中安置区（凤山花园）物业管理服务采购项目(CZ2020-0140)</a></td> \n         <td>2020-02-26 </td> \n        </tr> \n       </tbody> \n      </table> \n     </div> \n    </div> \n   </div> \n   <div class=\"friend\"> \n    <div class=\"layer-container\"> \n     <div class=\"friend-links clearfix\"> \n      <span class=\"friend-links-title\">友情链接</span> \n      <ul class=\"clearfix\"> \n       <li class=\"dropdown\"> <a href=\"javascript:;\" class=\"dropdown-toggle\" data-toggle=\"dropdown\"> <span class=\"username \"> 国家部委网站 </span> <i class=\"fa fa-angle-down\"></i> </a> \n        <ul class=\"dropdown-menu\"> \n         <li data=\"http://www.mohurd.gov.cn\"> <a href=\"javascript:void(0);\">中华人民共和国住房和城乡建设部</a> </li> \n         <li data=\"http://www.ndrc.gov.cn\"> <a href=\"javascript:void(0);\">中华人民共和国国家发展和改革委员会</a> </li> \n         <li data=\"http://www.mot.gov.cn/\"> <a href=\"javascript:void(0);\">中华人民共和国交通运输部</a> </li> \n         <li data=\"http://www.mwr.gov.cn\"> <a href=\"javascript:void(0);\">中华人民共和国水利部</a> </li> \n         <li data=\"http://www.chinabidding.com.cn/index.html\"> <a href=\"javascript:void(0);\">中国采购与招标网</a> </li> \n         <li data=\"http://www.ccgp.gov.cn/\"> <a href=\"javascript:void(0);\">中国政府采购网</a> </li> \n         <li data=\"http://wenshu.court.gov.cn/\"> <a href=\"javascript:void(0);\">中国裁判文书网</a> </li> \n        </ul> </li> \n       <li class=\"dropdown\"> <a href=\"javascript:;\" class=\"dropdown-toggle\" data-toggle=\"dropdown\"> <span class=\"username \"> 广东省政府机构网站 </span> <i class=\"fa fa-angle-down\"></i> </a> \n        <ul class=\"dropdown-menu\"> \n         <li data=\"http://www.gd.gov.cn/\"> <a href=\"javascript:void(0);\">广东省人民政府</a> </li> \n         <li data=\"http://fgw.gz.gov.cn/\"> <a href=\"javascript:void(0);\">广东省发展和改革委员会</a> </li> \n         <li data=\"http://td.gd.gov.cn/\"> <a href=\"javascript:void(0);\">广东省交通运输厅</a> </li> \n         <li data=\"http://slt.gd.gov.cn/\"> <a href=\"javascript:void(0);\">广东省水利厅</a> </li> \n         <li data=\"http://nr.gd.gov.cn/\"> <a href=\"javascript:void(0);\">广东省自然资源厅</a> </li> \n         <li data=\"http://zfcxjst.gd.gov.cn/\"> <a href=\"javascript:void(0);\">广东省住房和城乡建设厅</a> </li> \n         <li data=\"http://www.gdgpo.gov.cn/\"> <a href=\"javascript:void(0);\">广东省政府采购网</a> </li> \n        </ul> </li> \n       <li class=\"dropdown\"> <a href=\"javascript:;\" class=\"dropdown-toggle\" data-toggle=\"dropdown\"> <span class=\"username \"> 广州市政府机构网站 </span> <i class=\"fa fa-angle-down\"></i> </a> \n        <ul class=\"dropdown-menu\"> \n         <li data=\"http://www.gz.gov.cn/\"> <a href=\"javascript:void(0);\">广州市人民政府</a> </li> \n         <li data=\"http://fgw.gz.gov.cn/\"> <a href=\"javascript:void(0);\">广州市发展和改革委员会</a> </li> \n         <li data=\"http://www.gzfinance.gov.cn/\"> <a href=\"javascript:void(0);\">广州市财政局</a> </li> \n         <li data=\"http://www.gzlpc.gov.cn/\"> <a href=\"javascript:void(0);\">广州市规划和自然资源局</a> </li> \n         <li data=\"http://zfcj.gz.gov.cn/\"> <a href=\"javascript:void(0);\">广州市住房和城乡建设局</a> </li> \n         <li data=\"http://113.108.173.5:8060/r1/SignOnServlet\"> <a href=\"javascript:void(0);\">广州市建设工程招投标监管管理综合平台</a> </li> \n         <li data=\"http://gzg2b.gzfinance.gov.cn/gzgpimp/portalindex.do?method=goIndex\"> <a href=\"javascript:void(0);\">广州市政府采购平台</a> </li> \n         <li data=\"http://www.gzjjjc.gov.cn/\"> <a href=\"javascript:void(0);\">广州市监察委员会</a> </li> \n         <li data=\"http://www.gzjt.gov.cn/\"> <a href=\"javascript:void(0);\">广州市交通运输局</a> </li> \n         <li data=\"http://gwj.gz.gov.cn/\"> <a href=\"javascript:void(0);\">广州市港务局</a> </li> \n         <li data=\"http://nyncj.gz.gov.cn/\"> <a href=\"javascript:void(0);\">广州市农业农村局</a> </li> \n        </ul> </li> \n       <li class=\"dropdown\"> <a href=\"javascript:;\" class=\"dropdown-toggle\" data-toggle=\"dropdown\"> <span class=\"username \"> 其他相关网站 </span> <i class=\"fa fa-angle-down\"></i> </a> \n        <ul class=\"dropdown-menu\"> \n         <li data=\"http://www.chinabidding.com.cn/index.html\"> <a href=\"javascript:void(0);\">中国采购与招标网</a> </li> \n         <li data=\"http://www.gzrailway.com.cn/index\"> <a href=\"javascript:void(0);\">中国铁路广州局集团有限公司</a> </li> \n         <li data=\"https://www.gd.csg.cn/\"> <a href=\"javascript:void(0);\">广东电网有限责任公司</a> </li> \n         <li data=\"http://ggzy.gd.gov.cn/\"> <a href=\"javascript:void(0);\">广东省公共资源交易中心</a> </li> \n         <li data=\"http://www.jsgcjyxh.gd.cn/client/home/index.jsp\"> <a href=\"javascript:void(0);\">广东省建设工程交易协会</a> </li> \n         <li data=\"http://www.gzebpubservice.cn/\"> <a href=\"javascript:void(0);\">广州公共资源交易公共服务平台</a> </li> \n        </ul> </li> \n      </ul> \n     </div> \n     <div class=\"friend-boxs\"> \n      <ul class=\"clearfix\"> \n       <li> \n        <div class=\"friend-title\" style=\"background: none;\"></div> \n        <div class=\"friend-body\"> \n         <a href=\"javascript:void(0);\" onclick=\"openConfirm('http://121.43.68.40/exposure/jiucuo.html?site_code=4401000105&amp;url=当前访问网址 ')\" class=\"text-center\"> <img src=\"/r/cms/www/default/images/footer_img_gov_ff.png\"> </a> \n         <a href=\"javascript:void(0);\" onclick=\"openConfirm('http://bszs.conac.cn/sitename?method=show&amp;id=17C02C40B5A2464AE053022819ACE544')\" class=\"text-center\"> <img src=\"/r/cms/www/default/images/footer_img_comp.png\"> </a> \n        </div> </li> \n       <li> \n        <div class=\"friend-title\">\n         网站信息\n        </div> \n        <div class=\"friend-body\"> \n         <p class=\"clearfix\" style=\"padding-bottom: 35px;\"> <a href=\"http://ggzy.gz.gov.cn/dbwzxxgybw.jhtml\">关于本网</a> <a href=\"http://ggzy.gz.gov.cn/dbwzxxwzdt.jhtml\">网站地图</a> </p> \n         <p class=\"clearfix\"> <a href=\"http://202.104.65.179/\" target=\"_blank\">旧版入口</a> <a href=\"http://voice.gz.gov.cn/.m/turbowas/a.jsp?entryUri=/&amp;entryDomain=http://ggzy.gz.gov.cn\" target=\"_blank\">无障碍辅助浏览</a> \n          <!--<a href=\"javascript:void(0);\" >网站声明</a>--> </p> \n        </div> </li> \n       <li> \n        <div class=\"friend-title\">\n         联系我们\n        </div> \n        <div class=\"friend-body\"> \n         <p class=\"clearfix\"><a href=\"http://www.gzprtc.cn\">www.gzprtc.cn</a> <a href=\"/jyzxwz/index.jhtml\" class=\"text-right\">交易中心位置</a></p> \n         <p class=\"clearfix\" style=\"padding: 7px 0;\"><a href=\"http://www.gzggzy.cn\">www.gzggzy.cn</a></p> \n         <p class=\"clearfix\"><a href=\"http://ggzy.gz.gov.cn\">ggzy.gz.gov.cn</a> <span class=\"text-right\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;020-28866000</span></p> \n        </div> </li> \n       <li> \n        <div class=\"friend-title\">\n         新媒体矩阵\n        </div> \n        <div class=\"friend-body\"> \n         <div style=\"padding-bottom: 20px; padding-top: 5px;\" class=\"wechat\"> \n          <img src=\"/r/cms/www/default/images/footer_img_excode.png\"> 网站官方微信公众号 \n          <div class=\"wechat-in\"> \n           <img src=\"/r/cms/www/default/images/QRcode1.jpg\"> \n          </div> \n         </div> \n         <div style=\"display:none\">\n          <img src=\"/r/cms/www/default/images/footer_img_excode.png\"> 网站官方小程序\n         </div> \n        </div> </li> \n      </ul> \n     </div> \n    </div> \n   </div> \n   <script type=\"text/javascript\">\n\n\t//平台、设备和操作系统\n\tvar system ={\n\t\twin : false,\n\t\tmac : false,\n\t\txll : false\n\n\t};\n\n\t//检测平台\n\tvar p = navigator.platform;\n\tsystem.win = p.indexOf(\"Win\") == 0;\n\tsystem.mac = p.indexOf(\"Mac\") == 0;\n\tsystem.x11 = (p == \"X11\") || (p.indexOf(\"Linux\") == 0);\n\t//跳转语句，如果是手机访问就自动跳转到wap.baidu.com页面\n\tif(system.win||system.mac||system.xll){\n\n\t}\n\telse{\n\t\twindow.location.href=\"/wap/index.html\";\n\t}\n\n</script> \n   <div class=\"footer\">\n    <span>版权所有：</span>广州公共资源交易中心&nbsp;&nbsp;&nbsp; \n    <a href=\"javascript:void(0);\" onclick=\"openConfirm('http://beian.miit.gov.cn/')\" class=\"text-center\">粤ICP备 05049023号 </a> \n    <img src=\"/r/cms/www/default/images/footer_ic_%20records.png\"> \n    <a href=\"javascript:void(0);\" onclick=\"openConfirm('http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=44010602004086')\">粤公网安备 44010602004086号</a> &nbsp;&nbsp;网站标识码 4401000105 \n   </div> \n   <div class=\"fixed-right\"> \n    <a target=\"_blank\" href=\"https://login.gzggzy.cn/#/\" class=\"consulting-guide\"> 业务系统登录 </a> \n    <!--<a href=\"/fwznbszy/index.jhtml\" class=\"consulting-guide\">--> \n    <!--<img src=\"/r/cms/www/default/images/ic_float_guide.png\">服务指南--> \n    <!--</a>--> \n   </div> \n  </div>  \n  <script>\n    window._bd_share_config = {\n        \"common\": {\n            \"bdSnsKey\": {},\n            \"bdText\": \"\",\n            \"bdMini\": \"2\",\n            \"bdMiniList\": false,\n            \"bdPic\": \"\",\n            \"bdStyle\": \"0\",\n            \"bdSize\": \"16\"\n        },\n        \"share\": {},\n        \"image\": {\n            \"viewList\": [\"tsina\", \"weixin\", \"qzone\", \"sqq\"],\n            \"viewText\": \"分享到：\",\n            \"viewSize\": \"16\"\n        },\n        \"selectShare\": {\n            \"bdContainerClass\": null,\n            \"bdSelectMiniList\": [\"tsina\", \"weixin\", \"qzone\", \"sqq\"]\n        }\n    };\n    with (document) 0[(getElementsByTagName('head')[0] || body).appendChild(createElement('script')).src =\n        'http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion=' + ~(-new Date() / 36e5)];\n</script> \n  <script type=\"text/javascript\">\n\n    $(function () {\n        Cms.checkPerm(\"\", \"673741\");\n        Cms.collectCsi(\"\", \"collectCsiDiv\", \"collect_csi\", \"673741\");\n        Cms.attachment(\"\", \"673741\", \"0\", \"attach\");\n        Cms.viewCount(\"\", \"673741\");\n        Cms.siteFlow(\"\", location.href, document.referrer, \"true\");\n    });\n    var dayId = document.getElementById(\"dayId\");\n    var hourId = document.getElementById(\"hourId\");\n    var minId = document.getElementById(\"minId\");\n    var secId = document.getElementById(\"secId\");\n    setInterval(function () {\n        var nowTime = new Date().getTime();\n        var targTime;\n        // 解决ie浏览器获取时间的兼容性问题\n        var ieVersion = IEVersion();\n        if (ieVersion != '-1') {\n            var targTimeStr = \"2020-03-17 23:59:00\";\n            // 将现有的日期格式通过replace()方法将日期字符串替换成yyyy/MM/dd格式\n            targTimeStr = targTimeStr.replace(new RegExp(/-/g), \"/\");\n            targTime = new Date(targTimeStr).getTime();\n        } else {\n            targTime = new Date(\"2020-03-17 23:59:00\").getTime();\n        }\n        if (!targTime) {\n            // $(\".countDown > span\").text(\"还未开始\");\n            // $(\".countDown > strong\").text(\"00\");\n            $(\".countDownDiv\").hide();\n        } else if (nowTime > targTime) {\n            $(\".countDown \").addClass(\"end\");\n            $(\".countDown > span\").text(\"投标登记结束\");\n            $(\".countDown > strong\").text(\"00\");\n        } else {\n            $(\".countDown \").removeClass(\"end\").addClass(\"active\");\n            $(\".countDown > span\").text(\"投标登记中\");\n            var allSec = (targTime - nowTime) / 1000;\n            var day = checkTime(parseInt(allSec / (3600 * 24)));\n            var hour = checkTime(parseInt(allSec / 3600 % 24));\n            var min = checkTime(parseInt(allSec / 60 % 60));\n            var sec = checkTime(parseInt(allSec % 60));\n            dayId.innerHTML = day;\n            hourId.innerHTML = hour;\n            minId.innerHTML = min;\n            secId.innerHTML = sec;\n        }\n    }, 1000)\n\n    function checkTime(i) { //将0-9的数字前面加上0，例1变为01\n        if (i < 10) {\n            i = \"0\" + i;\n        }\n        return i;\n    }\n</script>  \n </body>\n</html>","notice_title":"中新广州知识城合作项目服务管理中心知识城中安置区（凤山花园）物业管理服务采购项目更正公告(CZ2020-0140)","notice_type":"变更公告","sup_table_dict":{"修改公告":[],"延期公告":["暂停"],"开标变更时间":["提交投标文件截止时间和开标时间："],"暂停公告":["延期公告、修改"],"重招标公告":["恢复"],"项目编号":["包件编码:","项目编号","标段编号"]}}
    final = ac.get_main_item(json.dumps(data))